Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I do

sudo apt-get update
sudo apt-get upgrade

Sometimes the Ubuntu GUI Update Manager will still have some items left. e.g. “Complete Generic Linuux kernel”.

I know there's also sudo apt-get dist-upgrade, but that touches other things.

My question is, what's another command line option that I can use that'd update the rest of items shown in GUI update manager (but doesn't touch anything else extra). In other words, I am looking for command line equivalent.

share|improve this question

migrated from stackoverflow.com Jan 26 '13 at 14:15

This question came from our site for professional and enthusiast programmers.

    
The Ubuntu update-manager package is open source so you might be able to fish through the source code to find your answer. I took a quick look, but I didn't notice anything unusual about the way they upgrade. –  Mike Jan 26 '13 at 15:22
    
It's not clear to me after some research that there is a direct equivalent, but there is a very enlightening answer explaining the difference between apt-get and aptitude. My guess is that Update Manager is similar to apt-get in that it has a slightly more specialized set of rules that it uses for updating, except that unlike apt-get update, its ruleset allows for installing new packages in some specialized cases, such as kernel updates. Hopefully someone more knowledgeable –  cha5on Feb 5 '13 at 7:25
1  
I'm pretty sure the answer is apt-get dist-upgrade. What do you mean, "that touches other things"? –  Flimm Feb 5 '13 at 8:59

2 Answers 2

up vote 7 down vote accepted

As Flimm commented, the answer really is sudo apt-get dist-upgrade (after running sudo apt-get update, which GUI package management tools automatically do the equivalent of). That is at least the closest thing to running the Software Updater (called Update Manager in older releases).

Running apt-get upgrade will upgrade packages that can be upgraded:

  • without installing any packages that aren't already installed in some version, and
  • without removing any packages.

The Update Manager is capable of doing both these things, so apt-get dist-upgrade is quite close to it.

  • Running sudo apt-get dist-upgrade will not, by itself, upgrade your Ubuntu system to a newer release. In fact, unlike in Debian, apt-get dist-upgrade is not a supported way to upgrade to a new release. In Debian (and in Ubuntu, though it may sometimes fail and is unsupported), changing all the repositories listed in /etc/apt/sources.list to the repositories for the next release and running sudo apt-get dist-upgrade will attempt to upgrade to the next release.

Because apt-get dist-upgrade can remove package (and install new packages you might not want), it's always best to look through the description of what it intends to do before pressing y.

So while running sudo apt-get -y upgrade is usually reasonable, the -y flag should rarely be used with dist-upgrade.

The reason you don't get new kernel versions with sudo apt-get upgrade is because they each are provided by separate, differently named packages. (The kernel version is part off the name.) This is to facilitate keeping an old kernel installed alongside a newer kernel (and being able to select between them in the GRUB menu).

The automatic offering of new kernel packages for installation is accomplished by having a metapackage (like linux-image-generic) installed. When a new kernel comes out for your Ubuntu release, your kernel metapackage is upgraded and the upgraded version fo that metapackage lists the new kernel as a dependency (without preventing the old kernel from continuing to be installed).

If you don't want to use sudo apt-get dist-upgrade, then you can always manually upgrade the individual packages that are listed as held back when you ran sudo apt-get upgrade. To do this, "install" them: sudo apt-get install packagename.

share|improve this answer

Likely is the wrong place but I believe you want to do:

apt-get -f install

This will clean up outstanding dependencies

share|improve this answer
1  
thanks. that doesn't seem to be it though. I did apt-get -f install then update and upgrade again, then go to the manager gui and check, still items. –  Xah Lee Jan 26 '13 at 6:14

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.