I have installed Ubuntu 12.04 on Amazon EC2. Sometimes after connecting with the instance I get the following

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

How can I find which packages can be updated? Can I choose if don't wish to update some packages?

  • Question: how do I see the number of packages that can be updated after I have connected to the server. It pops up when I first connect but how I do I see it afterwards? Thanks. Apr 8 '17 at 21:14

To do a simulated update: sudo apt-get -s upgrade
To update only a single package: sudo apt-get upgrade packagename_here


You can see what updates are available by typing as sudo aptitude.

For example,


And if you don't want any package to update, then you can lock that package.

  1. Open a terminal
  2. Type sudo -s and hit enter
  3. Enter your password for sudo

    echo libxfont1 hold | dpkg --set-selections
  4. Replace libxfont1 with the package you want to pin
  5. Now run sudo apt-get update and then sudo apt-get upgrade.

For more information, check how to pin packages.


Please do this

sudo cat /var/lib/update-notifier/updates-available

then check what packages are available for upgrade

apt list --upgradable

then just install what you need from the outcome above

sudo apt-get install PACKAGE_NAME


You can hold any certain package, this will keep it at the same version no matter what.

First run sudo -s, then echo package_name hold | dpkg --set-selections.

You can then remove the hold with sudo apt-get install package_name.

Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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