apt and apt-get

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

apt and apt-get

Eliza
Hi,

I am running ubuntu-18.04, which has both apt and apt-get for package
management.

$ apt-get -v
apt 1.6.10 (amd64)

$ apt -v
apt 1.6.10 (amd64)

Are these two programs the same one? which is suggested?

Thanks.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: apt and apt-get

Colin Watson
On Fri, Aug 09, 2019 at 05:14:33PM +0800, Eliza wrote:

> I am running ubuntu-18.04, which has both apt and apt-get for package
> management.
>
> $ apt-get -v
> apt 1.6.10 (amd64)
>
> $ apt -v
> apt 1.6.10 (amd64)
>
> Are these two programs the same one? which is suggested?

"man apt" says:

       apt provides a high-level commandline interface for the package
       management system. It is intended as an end user interface and enables
       some options better suited for interactive usage by default compared to
       more specialized APT tools like apt-get(8) and apt-cache(8).

Both of these programs are relatively simple frontends over the same
library code, so it's safe to use either one, but "apt" has better
defaults and if you're new to the system you should start with that.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: apt and apt-get

Colin Law
On Fri, 9 Aug 2019 at 11:11, Colin Watson <[hidden email]> wrote:

>
> On Fri, Aug 09, 2019 at 05:14:33PM +0800, Eliza wrote:
> > I am running ubuntu-18.04, which has both apt and apt-get for package
> > management.
> >
> > $ apt-get -v
> > apt 1.6.10 (amd64)
> >
> > $ apt -v
> > apt 1.6.10 (amd64)
> >
> > Are these two programs the same one? which is suggested?
>
> "man apt" says:
>
>        apt provides a high-level commandline interface for the package
>        management system. It is intended as an end user interface and enables
>        some options better suited for interactive usage by default compared to
>        more specialized APT tools like apt-get(8) and apt-cache(8).
>
> Both of these programs are relatively simple frontends over the same
> library code, so it's safe to use either one, but "apt" has better
> defaults and if you're new to the system you should start with that.

In addition apt simplifies things combining other commands.  For
example previously apt-cache could be used in this way
apt-cache policy <package>
now one can do
apt policy <package>

Colin
>
> --
> Colin Watson                                       [[hidden email]]
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: apt and apt-get

Robert Heller
In reply to this post by Eliza
At Fri, 9 Aug 2019 17:14:33 +0800 "Ubuntu user technical support,  not for general discussions" <[hidden email]> wrote:

>
> Hi,
>
> I am running ubuntu-18.04, which has both apt and apt-get for package
> management.
>
> $ apt-get -v
> apt 1.6.10 (amd64)
>
> $ apt -v
> apt 1.6.10 (amd64)
>
> Are these two programs the same one? which is suggested?

Different programs (different syntax), same effective function.  I believe
apt-get is being phased out in favor of apt.

>
> Thanks.
>

--
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
[hidden email]       -- Webhosting Services
                                         

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: apt and apt-get

Francis (Grizzly) Smit


On 09/08/2019 21:23, Robert Heller wrote:
At Fri, 9 Aug 2019 17:14:33 +0800 "Ubuntu user technical support,  not for general discussions" [hidden email] wrote:

Hi,

I am running ubuntu-18.04, which has both apt and apt-get for package 
management.

$ apt-get -v
apt 1.6.10 (amd64)

$ apt -v
apt 1.6.10 (amd64)

Are these two programs the same one? which is suggested?
Different programs (different syntax), same effective function.  I believe 
apt-get is being phased out in favor of apt.

In my experience apt is the more flexible, and is superior as it gives you a one stop shop for it all



Thanks.


    
--
   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: apt and apt-get

Liam Proven
In reply to this post by Eliza
On Fri, 9 Aug 2019 at 11:17, Eliza <[hidden email]> wrote:

>
> Hi,
>
> I am running ubuntu-18.04, which has both apt and apt-get for package
> management.
>
> $ apt-get -v
> apt 1.6.10 (amd64)
>
> $ apt -v
> apt 1.6.10 (amd64)
>
> Are these two programs the same one? which is suggested?

It's worse, there's aptitude too.

APT is the family of tools; historically ``apt-get'' was one of the
many sub-tools. ``apt'' was another.

Debian decided this wasn't ideal and put quite a lot of effort into
``aptitude'' which is a more powerful replacement and wraps up various
other tools.

Ubuntu is a descendant of Debian but focusses less on power and more
on friendliness.

So it enhanced the ``apt'' tool a bit to make it easier to do common stuff.

So formerly the official way to do some stuff was:

apt-get update
(refresh your local index of what's in the online software repositories)

apt-get install [appname]
(install this new app)

apt-get upgrade

(upgrade to the latest version of all apps)

apt-get dist-upgrade
(upgrade the whole distro including installing new apps if needed)

But

apt-search [appname]
to find something

and

apt-cache clean
to clean up the local package cache

Now ``apt'' makes it a bit easier and with less typing.

apt udate
apt install [appname]
apt full-upgrade

You only need the one command, not 3 or 4 sub-commands.


--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: apt and apt-get

Colin Watson
On Fri, Aug 09, 2019 at 02:28:31PM +0200, Liam Proven wrote:
> APT is the family of tools; historically ``apt-get'' was one of the
> many sub-tools. ``apt'' was another.
>
> Debian decided this wasn't ideal and put quite a lot of effort into
> ``aptitude'' which is a more powerful replacement and wraps up various
> other tools.

The "apt" program, as opposed to the "apt" package name, only came into
existence in 2013/2014 or so, long after aptitude, so the existence of
both apt-get and apt can't possibly have been part of the motivation for
the creation of aptitude.  (There were always people in Debian working
on both apt and aptitude in different directions; apt supplied a
significant amount of core library code to both frontends.)

I believe that the "apt" frontend program was originally called
"apt-get" mainly because the "apt" name was taken by something else
(IIRC some Java build tool?), now long since obsolete.

> Ubuntu is a descendant of Debian but focusses less on power and more
> on friendliness.
>
> So it enhanced the ``apt'' tool a bit to make it easier to do common stuff.

While Ubuntu developers have certainly been heavily involved in apt
maintenance and on the "apt" program, for the most part they've been
doing that work in Debian.  It's not in either Debian's or Ubuntu's
interests to have very much divergence in apt code, and for example the
version of apt (1.6.1) that shipped in the original release of Ubuntu
18.04 was a verbatim copy of one that was uploaded to Debian.

Debian experimental has exactly the same version of apt as Ubuntu 19.10
right now.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users