Skip to content

Instantly share code, notes, and snippets.

@jineshqa
Last active November 14, 2017 05:36
Show Gist options
  • Save jineshqa/ddb40a28b61a3cd36d02cadcd18b4953 to your computer and use it in GitHub Desktop.
Save jineshqa/ddb40a28b61a3cd36d02cadcd18b4953 to your computer and use it in GitHub Desktop.
Put a package on hold in ubuntu

dpkg

Put a package on hold:

echo "<package-name> hold" | sudo dpkg --set-selections

Remove the hold:

echo "<package-name> install" | sudo dpkg --set-selections

Display the status of your packages:

dpkg --get-selections

Display the status of a single package:

dpkg --get-selections | grep "<package-name>"

apt

Hold a package:

sudo apt-mark hold <package-name>

Remove the hold:

sudo apt-mark unhold <package-name>

aptitude

Hold a package:

sudo aptitude hold <package-name>

Remove the hold:

sudo aptitude unhold <package-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment