If a newer release for a package is available, then you can upgrade it using the apt-get install --only-upgrade command followed by the package name:
apt-get install --only-upgrade package_name
For example, you can upgrade the nano package by running the command:
root@ubuntu-linux:~# apt-get install --only-upgrade nano
Reading package lists... Done
Building dependency tree
Reading state information... Done
nano is already the newest version (2.9.3-2).
The following package was automatically installed and is no longer required:
hoichess
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 357 not upgraded.
You can also upgrade all the installed packages on your system by running the commands:
- apt-get update
- apt-get upgrade
The first command apt-get update will update the list of available packages and their versions, but it doesn’t do any installation or upgrade:
root@ubuntu-linux:~# apt-get update
Ign:1 http://dl.google.com...