Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

aptitude vs apt vs apt-get (was: Re: [Pkg-zsh-devel] apt autocompletion issue)



Hi Oliver,

Oliver Kiddle wrote:
> Out of interest, what is the recommended apt* tool these
> days?

Depends on what you want to achieve or where you want to use it. They
all have their uses. :-)

TL;DR: Use aptitude if you need TUI or patterns, apt for CLI comfort,
apt-get/apt-cache for scripting and a stable CLI.

> Is aptitude the best or most powerful with apt as the simplified
> interface and apt-get just a historic relic?

Disclaimer: This might be biased as I'm a hardcore aptitude user. And
I'm one of the two current aptitude maintainers.

aptitude is still the most powerful sincec it's the only one with a
pattern matching language on packages. But apt and apt-get/apt-cache
might get this in the future, too.

There are still a few more differences which won't change that quickly:

* aptitude is the sole tool with a TUI. (And previously also contained
  a GTK and a never released Qt GUI. Both were removed as they were
  unmaintained and never really stable.)

* aptitude's dependency resolver is optimized on interaction with the
  user, i.e. getting interactively further hints from the user on how
  to solve a non-trivial dependency issue.

* apt and apt-get are optimized for one-shot solutions, i.e. try to
  get the sanest solution first.

  They're also usually faster than aptitude which tracks more metadata
  needed for pattern matching or package displaying.

* apt is (currently) solely meant for commandline user by an admin. It
  has far more comfortable defaults (e.g. color and progress bar) and
  a not completely identical set of subcommands compared to
  apt-get/apt-cache.

* apt-cache/apt-get have a stable commandline interface and are best
  for scripting — for now unless you need the power of aptitude's
  pattern matching.

  But beware: Even though a few years ago there was quite an effort to
  make the exit codes of aptitude in error cases more consistent and
  sane, there are still a few rough edges and inconsistencies in that
  area.

P.S. and JFTR: There is no such war between apt and aptitude. We've
merged both teams a year ago or so and all aptitude developers have
now also commit rights on apt and vice versa:
https://salsa.debian.org/apt-team

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@xxxxxxxxxx>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Messages sorted by: Reverse Date, Date, Thread, Author