• Home
  • About
  • Contact
  • Store

IT from Scratch

Small Business IT from the ground up

Ubuntu: “The following packages have been kept back”

August 19, 2013 By The New Guy 1 Comment

I was doing some work on an Invenio installation today, and I came across a warning that’s pretty common to Ubuntu: “The following packages have been kept back.” Here’s what happened, and here’s how to fix it.

Unless you’ve changed your message of the day file, when you log into an Ubuntu server it gives you some general system info. This is the MOTD I got when I logged in this morning:
Ubuntu Message of the Day
Noticing that there were some packages that could be updated, I ran the normal update and upgrade commands:

sudo apt-get update && sudo apt-get upgrade

I expected that this would install the newest versions of whatever packages needed to be updated, but my server had something else in mind.

Ubuntu: The Following Packages have been Kept Back

Why “The following packages have been kept back”?

The output of this warning isn’t very clear, and it begs the question: why? The message doesn’t tell us, so unless we know better it can be a confusing result.

Under normal circumstances running sudo apt-get upgrade would install the newest version of any packages installed on your computer. The problem is that sometimes the newest versions have new dependencies that weren’t required before.

apt-get checks for those new dependencies, and if they aren’t installed, the upgrade stops and we get this warning.

Resolution

We have to tell apt-get to install the updates and any dependencies they require. The command for that is:

sudo apt-get dist-upgrade

This is a pretty handy command, but an important warning from the AskUbuntu forums tells us this:

dist-upgrade will install all pending updates, with their new dependencies. If for some reason, you don’t want to do that, you should use apt-get install package-name dependency-package-name instead.

Now you know why those packages have been kept back and how to get your updates.

Filed Under: Scratch

Comments

  1. John says

    June 22, 2014 at 5:58 pm

    OptiPlex-990 ~ $ sudo apt-get dist-upgrade
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Calculating upgrade… Done
    The following packages have been kept back:
    mint-meta-codecs
    0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Click Here for 500 MB free VPN connection through Private Tunnel

Recent Posts

  • How to Get the macOS Catalina Installer, Post Big Sur
  • Mac: How to Get SHA1 Hash
  • iTunes error: “You do not have enough access privileges for this operation”
  • Is Websense Filtering My Internet Traffic?
  • How to Delete a Mac VPN Profile
  • Home
  • About
  • Contact
  • Store

Copyright © 2023 ·WP-Ubuntu