20

I have a 16.04 server on Digital Ocean that lists this when I ssh into it...

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

7 packages can be updated.
7 updates are security updates.

I have run apt-get update and apt-get upgrade many times and it has not gone away.

After I run the upgrade I see this as the last line...

0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1
  • 5
    I recommend using apt instead of apt-get, as it deals with such situations more intelligently (in particular, sudo apt upgrade would have upgraded those four packages).
    – fkraiem
    Commented Dec 9, 2016 at 0:49

4 Answers 4

24

Since your using ubuntu 16.04 the following should fix it:

sudo apt full-upgrade

But if you prefer the Ubuntu 14.04 way then:

sudo apt-get dist-upgrade

If the two commands don't work you should talk to digital ocean about it.

Hope that helps.

6

Use the dist-upgrade command, which will perform upgrades that require changing dependencies, adding or removing new packages if necessary. This will handle a set of upgrades which may have been kept back by apt-get upgrade:

sudo apt-get update
sudo apt-get dist-upgrade

For more information see What is "dist-upgrade" and why does it upgrade more then "upgrade" ?

6

It is possible your /var/lib/update-notifier/updates-available file did not refresh after your last update.

If you want to set this manually:

sudo su # Needed to acquire permissions.
/usr/lib/update-notifier/apt-check --human-readable >/var/lib/update-notifier/updates-available
exit    # to get out of sudo

Note that /var/lib/update-notifier/updates-available is set with 0600 for permissions for the user & group 'root', which prevent you from simply sudo-ing the apt-check command to rewrite it.

5
  • 2
    It’s not the 600, but bash syntax. apt-check does’t need permission; the > does. Try replacing > with | sudo tee to verify. Commented Jul 25, 2018 at 2:52
  • This was the only working answer for me. Byobu was saying i had 1400+ upgradable packages, and apt list --installed indicated the same. Apt upgrade said 0 upgrades available.
    – unixandria
    Commented Feb 12, 2020 at 20:20
  • sudo /usr/lib/update-notifier/apt-check --human-readable | sudo tee /var/lib/update-notifier/updates-available && sudo apt -y update && sudo apt -y dist-upgrade && sudo apt -y autoremove
    – uav
    Commented Apr 14, 2021 at 17:43
  • I'd check this and update my answer, but I can't... I can update the answer, but I can't check that it works, as I lack a system with this problem at the moment. Commented Apr 18, 2021 at 13:00
  • I don't have a /usr/lib/update-notifier directory. :-/ Commented Apr 24, 2021 at 0:47
2

First of all the message

0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

says that there are 4 packages not upgraded. I guess these are related to a newer kernel and can be upgraded with

apt-get full-upgrade 

Besides that the message

7 packages can be updated.
7 updates are security updates.

is not calculated every time you login so it might be outdated.

3
  • 1
    Is there a way I can force it to update? It used to clear everytime I updated the system and this time it has been stuck for over a week
    – Joff
    Commented Dec 9, 2016 at 1:06
  • I'm afraid I don't know the answer to this :(
    – jsalatas
    Commented Dec 9, 2016 at 1:13
  • sudo apt full-apgrade is the safest way to update what's available. If that doesn't help, one or more packages may be held back due to unmet dependendices. Normally that fixes itself in a few days. Commented Dec 9, 2016 at 2:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .