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 used the following commands to lock my Samba installation from upgrading.

echo samba hold | dpkg --set-selections
echo samba install | dpkg --set-selections

My question is simple. How do I reverse this so that apt-get upgrade samba will work again?

share|improve this question
up vote 2 down vote accepted

The first command you listed places a package on hold

echo samba hold | dpkg --set-selections

The second command releases the package from hold

echo samba install | dpkg --set-selections

From man dpkg


Set package selections using file read from stdin. This file should be in the format ’ ’, where state is one of install, hold, deinstall or purge. Blank lines and comment lines beginning with ’#’ are also permitted.

See also

share|improve this answer
So using the two together like that has essentially no effect then? Everywhere I've seen that reference suggests that it will prevent Samba from updating. This is incorrect? – Nilpo Apr 9 '12 at 14:41
The two have opposite effects, you use them in conjunction , the first for a hold and the second to remove the hold. Not sure what you have been reading, look at the man page and link I gave you. – bodhi.zazen Apr 9 '12 at 14:59

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.