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?


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 http://www.debian-administration.org/articles/67

| 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
  • 1
    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. – Panther Apr 9 '12 at 14:59
  • The last like to article doesn't load properly (it's blank). – kenorb Dec 11 '19 at 14:42

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.