Why apt-get is not my favorite application

July 8, 2005

In a nutshell:

# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
3 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
Need to get 1351kB of archives. After unpacking 77.8kB will be freed.
Do you want to continue? [Y/n]

Truly, the count of packages to be fiddled with is more important that telling me what they are, by default. Here, apt-get manages to be simultaneously over-chatty and uninformative.

All too often apt-get doesn't seem like a program that is really at home with Unix and the Unix way of things. For all that it's a command line program, it doesn't feel much like part of a system; instead it seems to be its own little universe. As a result I wind up grinding my teeth most of the times that I have to deal with it.

Other irritations:

  • why doesn't 'apt-get upgrade' default to doing an 'apt-get update' at the start? Local caches and databases are an implementation detail, not a user interface.
  • why is it so hard to get just a list of the packages that 'apt-get upgrade' will upgrade? (A list of the package URIs is not the same thing.)
  • the verbosity.

I have no idea why people love it so much. Personally I like yum a whole lot more (although it's gotten more verbose in Fedora Core 4).


Comments on this page:

From 209.149.57.26 at 2005-07-09 02:01:14:

why doesn't 'apt-get upgrade' default to doing an 'apt-get update' at the start? Local caches and databases are an implementation detail, not a user interface.

I think I mostly agree with you, but there actually have been a few times I have been glad that it doesn't. Although, in those cases I admit I was doing apt-get install, and not upgrade. I had removed a package that had been upgraded, but I didn't want to install the latest update -- just the version I had previously (which luckily was still on the archives).

A small issue, but hey..

why is it so hard to get just a list of the packages that 'apt-get upgrade' will upgrade? (A list of the > package URIs is not the same thing.)

something more than "apt-get -s upgrade"?

By cks at 2005-07-09 02:21:46:

'apt-get -s upgrade' gives a list of actions, not a list of the packages (even with '-q=2'). Plain lists of packages are useful for condensed reporting and for passing to system management scripts for various purposes.

I can do:

apt-get -s -q=2 upgrade | awk '$1 == "Inst" {print $2}'

but this is fragile if Debian considers the output of apt-get something intended for humans instead of other programs, and therefor something that they can change to look 'nicer'. Which I rather suspect that they do, given everything else about apt-get.

An internal 'apt-get update' need not be mandatory, just the default. Turn it off with a command-line option in the rare cases that that's necessary.

Written on 08 July 2005.
« What RSS can learn from Usenet
The minimum antispam features of a modern SMTP server »

Page tools: View Source, View Normal.
Search:
Login: Password:

Last modified: Fri Jul 8 23:43:48 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.