Packages held back

Discussion in 'all things UNIX' started by vasa1, Dec 10, 2011.

Thread Status:
Not open for further replies.
  1. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    I'm on 11.10. I check for updates a few times a day using sudo apt-get update && sudo apt-get upgrade.
    Today, I noticed this:
    Code:
    The following packages have been [b]kept back[/b]:
      linux-generic-pae linux-headers-generic-pae linux-image-generic-pae
    The following packages will be upgraded:
      linux-libc-dev
    1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    Need to get 820 kB of archives.
    After this operation, 8,192 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric-updates/main linux-libc-dev i386 3.0.0-14.23 [820 kB]
    Fetched 820 kB in 17s (48.1 kB/s)                                                                                                  
    (Reading database ... 188037 files and directories currently installed.)
    Preparing to replace linux-libc-dev 3.0.0-13.22 (using .../linux-libc-dev_3.0.0-14.23_i386.deb) ...
    Unpacking replacement linux-libc-dev ...
    Setting up linux-libc-dev (3.0.0-14.23) ...
    Dell:~$
    
    I logged onto askubuntu.com to see what is to be done when stuff is kept back. Running sudo apt-get dist-upgrade as suggested here worked for the OP.
    Another suggestion was to wait for a couple of days in case the reason was at Ubuntu's end.
    I have not used sudo apt-get dist-upgrade ever before and was inclined to wait a few days.

    I don't know why, but I opened Software Manager, something I don't usually do. And there were the packages (~48 MB) waiting to be installed. I was prompted to restart to complete the process which I did and now all is well.
     
  2. tlu

    tlu Guest

    vasa1,

    I always execute ... dist-upgrade.

    The difference is: Contrary to a normal upgrade also new packages will be installed and old packages, which have become useless because of new dependencies, will be replaced. I think it's the standard behavior for most software managers like Synaptic or Muon.
     
  3. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    Do you routinely do sudo apt-get update && sudo apt-get dist-upgrade instead of sudo apt-get update && sudo apt-get upgrade? Alternatively, can I just check the Update Manager whenever I feel bored instead of sudo apt-get update && sudo apt-get upgrade?

    Are you recommending that checking for updates via a software manager is the more appropriate way to go, especially for a newbie?

    Don't hesitate to give a lengthy explanation :D or at least to point me to a link that makes the distinctions clear!
     
  4. tlu

    tlu Guest

    Yes, I do.

    As mentioned, all software managers perform a dist-upgrade, IMHO. It doesn't matter what you prefer. I'm using the following alias contained in my .bash_aliases file:

    alias U="sudo apt-get update ; sudo apt-get dist-upgrade"

    Makes life a lot easier ;)

    A good site is https://help.ubuntu.com/community/AptGet/Howto
    Specifically for your question read http://www.ghacks.net/2010/03/11/what-is-it-with-the-dist-upgrade-option-of-apt-get/
     
  5. vasa1

    vasa1 Registered Member

    Joined:
    May 1, 2010
    Posts:
    4,417
    From a reading of both links, I'm tempted to conclude that the advantage of dist-upgrade is that it does a better job of dealing with dependencies although this quote from the first link is puzzling: "it will attempt to upgrade the most important packages at the expense of less important ones if necessary."
     
  6. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    I have so far always done it the default way, don't consider myself smart enough for the smart upgrade. :D
    OK this is very old so probably overhauled:-
    vasa1, I like your posts, they get beginners like me thinking and (double) checking stuff I didn't know or bother with before. :)
     
  7. tlu

    tlu Guest

    Well, I also find this statement a bit funny so I won't comment it.

    Let me try to explain the difference in other words/with some examples instead:

    apt-get upgrade never installs new packages, only upgrades already installed packages.

    Examples:
    1. The update of the skin of your favourite media player needs a quite new font. Since apt-get upgrade never installs new packages, the new font won't be installed and, consequently, the skin won't be updated because of missing dependencies.

    2. Referring to your first post: A kernel update has the version number in the package name. These packages are therefore new packages never installed before. An apt-get upgrade will consequently hold them back.

    apt-get dist-upgrade is different: It will update all packages and will - if necessary - install new packages if there are new package dependencies.

    Its name is a bit misleading as an dist-upgrade does not perform an upgrade to a new Ubuntu release as many people seem to think. In order to do that there is the command do-release-upgrade.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.