I often update my system with apt-get update && apt-get dist-upgrade. This caused me a few problems with natty and nvidia drivers.

Someone on IRC told me that's because I did a partial upgrade, but I did not know.

How do I know if apt-get is going to do a partial upgrade?


Typically you should be wary of using "dist-upgrade" during the development release, if the archive is in an inconsistent state it will remove things and this will happen. This always isn't easy as you might have upgraded part of the system and the bits that they depend on might not be build yet.

Normally when this occurs packages to be "held back", but a dist-upgrade overrides that and just installs the newest things in the archive, whether that breaks your computer or not.

The simplest way you can recover is find out what you're missing and reinstall it, I would guess in your case you upgraded either X, nvidia, and/or your kernel and your mirror wasn't caught up or the right things weren't built yet. This is why I always upgrade with "apt-get upgrade" or the update-manager and just let things sit held back for a while.

What I do is do apt-get upgrade, then when certain things are held back I apt-get install them one at a time. So for example kernel packages will be held back and I manually install them. If something wants to remove something that looks important I keep it held back. It's not too time consuming and ensures that something important isn't removed.

| improve this answer | |
  • 2
    Indeed, don't use dist-upgrade on a regular basis. A partial upgrade IS dist-upgrade. – psusi Mar 19 '11 at 19:34
  • Do you suggest using the plain 'upgrade' command? I've seen that this command does not install kernel upgrades for example, why? – Weboide Mar 22 '11 at 15:20
  • apt-get upgrade (or these days, you can also just use apt upgrade) definitely installs kernel upgrades. dist-upgrade is asking for trouble unless you actually want to install the next version of Ubuntu. – Lambart Aug 17 '17 at 17:20

It's obviously a little bit manual, but you can also check the build status of Natty generally with this link.

If I see NVidia or Kernel related packages in there, I tend not to do the upgrade, as it will usually result in breakage if you either use dist-upgrade, or use the update-manager and ignore its warnings about partial upgrades.

I'm also very wary of any upgrade that wants to remove packages. It's reasonably rare and you should be careful of updating if large numbers of packages are set to be removed.

| improve this answer | |

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.