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.

Good day,

When I log into my web server via SSH I see the information:

88 packages can be updated.
80 updates are security updates

I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install them?

share|improve this question
Did you try this first: sudo apt-get clean this should clean the cache. –  user2635584 Sep 20 '13 at 16:02

7 Answers 7

Try this:

sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)
share|improve this answer
Wouldn't it be nice like: apt-get update-packages, apt-get upgrade-current, apt-get upgrade-major ? –  Air Jul 1 '14 at 12:03
@Air That would be nice. In particular, it would be cool to have a convenient, automated/automatable way to just install security updates, even when other updates are available and the software sources for them are enabled. –  Eliah Kagan Aug 13 '14 at 11:30
You read my mind. –  Air Aug 14 '14 at 0:21
What "apt-get upgrade-current" should do? –  Alexandre Teles Oct 1 '14 at 13:32

This is normal behavior.

The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using cat /etc/motd.

Still seeing the same updates available, after running sudo apt-get update && sudo apt-get upgrade, is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.

share|improve this answer
+1 the exact problem I was facing –  Wold Sep 30 '14 at 4:42

In my case, I had an incorrect or not accessible URL in /etc/apt/sources.list. After removing this URL, I was able to update all packages successfully.


sudo vi /etc/apt/sources.list
sudo apt-get update && sudo apt-get upgrade
share|improve this answer

Once your log into your server, run the command below.

sudo apt-get upgrade

It should do the trick. Maybe you just need to restart your server.

share|improve this answer
Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it. –  Marlin Oct 5 '12 at 14:04
if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server. –  Evandro Silva Oct 5 '12 at 14:11
Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ? –  NorTicUs Oct 5 '12 at 15:09
How can you give a 503 if the server is offline? –  Matteo Jan 12 at 13:58

If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away.

share|improve this answer

You may also need to do this -

sudo touch /etc/motd.tail

From - Ubuntu tells me I have packages to upgrade when I don't

It worked for me on 14.04

share|improve this answer

You can try all of these:

sudo apt-get install software-center (gets the software center)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
share|improve this answer
But why get the Software Center at all, if the goal is to install updates via the command line? (None of the subsequent commands you recommend require the Software Center, nor do any of them use it or benefit from it if it's installed.) Note also that it seems unlikely this will keep the "packages can be updated" message from appearing. As others have said, probably the message is just not yet reflecting the results of the update and upgrade actions. There could be packages not upgraded until the dist-upgrade action, but on a stable release it's rare to have 88 such packages at once. –  Eliah Kagan Aug 18 '14 at 3:28

protected by Community Nov 9 '14 at 16:48

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.