Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 36 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
    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
    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
2  
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
add comment

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 the upgrade script.

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
add comment

Your Answer

 
discard

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.