ubuntu says updates available after update and upgrade
Solution 1
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.
Solution 2
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.
Solution 3
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" ?
Solution 4
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.
Related videos on Youtube
Joff
My name is Jeff. I started learning HTML and CSS in the mid 90's as a kid, and just kept learning more and more...
Updated on September 18, 2022Comments
-
Joff over 1 year
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
andapt-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.
-
Admin over 7 yearsI recommend using
apt
instead ofapt-get
, as it deals with such situations more intelligently (in particular,sudo apt upgrade
would have upgraded those four packages).
-
-
Joff over 7 yearsIs 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
-
jsalatas over 7 yearsI'm afraid I don't know the answer to this :(
-
Gunnar Hjalmarsson over 7 years
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. -
Franklin Yu almost 6 yearsIt’s not the 600, but bash syntax.
apt-check
does’t need permission; the>
does. Try replacing>
with| sudo tee
to verify. -
unixandria about 4 yearsThis 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.
-
uav about 3 years
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
-
Joseph Van Riper about 3 yearsI'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.
-
Aaron Jensen about 3 yearsI don't have a
/usr/lib/update-notifier
directory.:-/