11

I had always assumed that running apt-get update followed by apt-get upgrade was just the command line version of running the software-updater; however, running the software updater results in the following packages needing updating:

Complete Generic Linux kernel  
Header files relates to Linux kernel version 3.2.0  
Linux kernel headers for version 3.2.0 on 64 bit x86 SMP  
Generic Linux kernel headers  
Linux kernel image for version 3.2.0 on 64 bit x86 SMP  
General Linux kernel image  
Linux Kernel Headers for development

ISC DHCP client  
common file used by all the isc-dhcp* packages  
LightDM GObject client library  
graphical boot animation and logger-shared libraries  
DisplayManager  
graphical  boot animation and logger-main package  
graphical boot animation and logger-label control  
graphical boot animation and logger-ubuntu-logo theme (-logo)  
graphical boot animation and logger-ubuntu-logo theme (-text)  
Jabber/XMPP connection manager

(53.9 MB)

whereas running apt-get update and apt-get upgrade results in:

Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
The following packages have been kept back:  
  linux-generic linux-headers-generic linux-image-generic  
The following packages will be upgraded:  
  isc-dhcp-client isc-dhcp-common liblightdm-gobject-1-0 libplymouth2 lightdm  
  linux-libc-dev plymouth plymouth-label plymouth-theme-ubuntu-logo  
  plymouth-theme-ubuntu-text telepathy-gabble  
11 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.  
Need to get 2,594 kB of archives.  
After this operation, 2,048 B of additional disk space will be used.  

Can anyone explain what's going on?

  • At some point they changed the behavior of upgrade, you're now looking for dist-upgrade if you also want to upgrade the kernel. – Bobby May 31 '13 at 12:16
9

There seems to be some confusion here.

  • apt-get update : This just refreshes the list of available packages.

  • apt-get upgrade: This will upgrade any installed packages to their latest version.

  • apt-get dist-upgrade : Same as upgrade but uses a "smart" conflict resolution system, it will attempt to upgrade the most important packages at the expense of less important ones if necessary.

So, if what you want is to make sure your currently installed packages are the most recent version available, you run

apt-get update && apt-get upgrade

If this results in problems then you might want to try:

apt-get update && apt-get dist-upgrade

Now, the messages you have posted have nothing to do with dist-upgrade, they are simple upgrades. There is also absolutely no difference between them, it is simply that the software updater is giving you the descriptions of the packages while apt-get is listing the package names. For example

Complete Generic Linux kernel  == linux-generic
ISC DHCP client                == isc-dhcp-client
Jabber/XMPP connection manager == telepathy-gabble  

If you read carefully through the two lists you will see that they are exactly the same packages.

That said, the messages you posted say the exact same thing.

  • 1
    I thought they would be the same, but the size of the downloads is massively different, unless those numbers aren't comparable?! – ChrisW Jun 4 '13 at 10:04
1

afaik, you miss a third piece:

apt-get dist-upgrade

Actually, apt-get upgrade won't upgrade packages in some cases, for example when they change dependencies or require some other packages to be removed. Bu apt-get dist-upgrade will. So to get a behaviour similar to the one of software-updater you need:

apt-get update && apt-get dist-upgrade

Or, if you want to play a little more safely:

apt-get update && apt-get upgrade && apt-get dist-upgrade

See: http://www.ghacks.net/2010/03/11/what-is-it-with-the-dist-upgrade-option-of-apt-get/
And also: https://askubuntu.com/q/194651/125726

  • 2
    "apt-get update && apt-get upgrade && apt-get dist-upgrade" Except that dist-upgrade performs all operations which would also have been run by upgrade. – Bobby May 31 '13 at 13:43
  • Right. The point is doing "safer" upgrades before, and after they went fine do dist-upgrade upgrades. – gerlos Jun 2 '13 at 16:28
  • I fail to see what you gain by that...except a smaller package number in the second run. – Bobby Jun 2 '13 at 17:53
  • Some time ago I had some troubles with packages from third party ppa whose dependences were broken. Using "normal" upgrade I could update everything but those broken packages, and since they were "isolated" from the others I could isolate them from the others, and solve my troubles. Not something that happens often, but a good approach to spot problems before they hit you, imho. – gerlos Jun 2 '13 at 18:11
  • I meant that I fail to see what difference it makes if you ran upgrade or dist-upgrade when running into trouble. The main difference is that the later will also try to update the kernel, but not touching the existing ones, so the system is never in danger as far as I can see. – Bobby Jun 2 '13 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.