apt and apt-get


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

$ 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?



Re: apt and apt-get

By Colin Watson at 08/09/2019 - 06:08

On Fri, Aug 09, 2019 at 05:14:33PM +0800, Eliza wrote:
"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.

Re: apt and apt-get

By Colin Law at 08/09/2019 - 06:25

On Fri, 9 Aug 2019 at 11:11, Colin Watson < ... at ubuntu dot com> wrote:
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>