Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an Ubuntu 8.04 LTS server. There are several packages which are "kept back" ("the following updates have been kept back:") when I do an apt-get upgrade. It's my understanding that I can do an apt-get dist-upgrade to upgrade these packages, but I have a few concerns:

1) If I do a dist-upgrade, will I be upgrading from 8.04 to higher version (8.10 I guess)? If so, what's the point of 8.04 being "long term support"?

2) Is this a "dangerous" process? I'm assuming that packages are kept back because there are new packages that they depend on. Does dist-upgrade simply pull the new packages and do a fairly straightforward upgrade, or are there caveats to look into?

share|improve this question
up vote 49 down vote accepted

The command apt-get upgrade will not add or remove packages. apt-get dist-upgrade will add or remove packages as required.

The command apt-get dist-upgrade will not automatically upgrade you from one release to another unless you have also updated your sources (/etc/apt/sources.list) to point at a newer release.

man apt-get

    upgrade is used to install the newest versions of all packages 
    currently installed on the system from the sources enumerated 
    in /etc/apt/sources.list.

    dist-upgrade, in addition to performing the function of upgrade, 
    also intelligently handles changing dependencies with new versions 
    of packages;

Are there special concerns to be aware of when doing a dist-upgrade vs upgrade?

For the most part I always apt-get dist-upgrade to apply updates to a system. Of course pay attention to exactly what new packages are being added or removed. Frequently this happens when something is being added like a newer kernel that isn't compatible with the previous and you will have to recompile modules. If you have some kernel module you had to build on your own, then you may need to make sure you recompile it for the new kernel. I have a couple systems with network interfaces not supported by the stock kernel that I have to recompile the network driver after each kernel update.

share|improve this answer
Thank you, that is what I was hoping. Are there special concerns to be aware of when doing a dist-upgrade vs upgrade? (not that one is a replacement for the other, I'm just wondering if there's anything else I should be aware of) – Boden Jul 27 '09 at 23:21
when you run the dist-upgrade, you'll get a summary of what it will do (packages to upgrade, new packages, packages to delete). just watch what it's deleting, if anything. if you haven't changed your /etc/apt/sources.list file, it shouldn't be anything too major, though. – brad.lane Jul 27 '09 at 23:25
Just for completion sake. To migrate to the next LTS release once it's available you'll need to run the following commands after making sure your 8.04 install is up to date. sudo apt-get install update-manager-core and then sudo do-release-upgrade. – 3dinfluence Jul 27 '09 at 23:36

upgrade vs. dist-upgrade are really debian terms. In debian you'd use upgrade to get changes within a stable release (which would not involve anything so drastic as a removal) and dist-upgrade to go between releases. dist-upgrade should have the same results as upgrade assuming no removals are necessary.

Going between releases would require changing your sources.list to point at the new release.

Ubuntu does not have the same ultraconservative release model, so the terms do not map cleanly -- you'd generally just want to use dist-upgrade unless you're going between releases, in which case you use its own upgrader, do-release-upgrade.

share|improve this answer
you'd generally just want to use dist-upgrade unless you're going between releases, in which case you use the upgrade script. I think, Captain Segfault, you meant it the other way round: -- you'd generally just want to use upgrade unless you're going between releases, in which case you use the dist-upgrade script. – user71015 Feb 16 '11 at 16:45
Ubuntu has a separate program to do the upgrade. You use that, not apt-get, to go between releases. – Captain Segfault Mar 26 '11 at 6:09
Where can I find this separate program please? – starbeamrainbowlabs Jun 13 '14 at 11:53
@starbeamrainbowlabs it's called do-release-upgrade, check man do-release-upgrade for details – isync Dec 29 '15 at 14:28
@isync Right. I knew about that - The comment wasn't clear so I thought that there was another command I hadn't come into contact with. Thanks! – starbeamrainbowlabs Dec 30 '15 at 17:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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