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?
Use this:
Documentation about each
apt
option can be found in the the manpages for apt. These are also available by runningman apt
in your terminal.Use of both
upgrade
andfull-upgrade
together is usually not needed, but it may help in some cases: see Debian documentation about Upgrades from Debian 9.Execute all the commands by typing
sudo
once:or:
or even shorter in a for loop (thanks @dessert!):
See the package management with APT maintenance commands documentation for more details.
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
Still seeing the same updates available, after running
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.
Once your log into your server, run the command below.
It should do the trick. Maybe you just need to restart your server.
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.
Commands:
My (really late, I like necromancer badges :-) ) solution:
Install wajig (once):
When you want to update/upgrade fully your system
(it will ask for password if needed, and do all the update, upgrade, dist-upgrade, and autoremove steps for you).
You may also need to do this -
From - Ubuntu tells me I have packages to upgrade when I don't
It worked for me on 14.04
If you run
apt-get update
again afterapt-get upgrade
has been concluded, those messages at ssh login should go away.this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one
to run on your local box just leave off that first line doing the ssh
here is an alias I save in ~/.bashrc
then on terminal I just issue
doit