Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

enter image description here

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

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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