NOTE: Package must be installed to put on hold.
dpkg: warning: package not in status nor available database at line 1: PACKAGE_NAME_HERE dpkg: warning: found unknown packages; this might mean the available database is outdated, and needs to be updated through a frontend method; please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
echo "[package name] hold" | sudo dpkg --set-selections
Put a bash package on hold.
echo "bash hold" | sudo dpkg --set-selections
dpkg --get-selections [package name]
NOTE: Use the grep command to filter for a single package named bash.
dpkg --get-selections | grep bash
echo "[package name] install" | sudo dpkg --set-selections
echo "bash install" | sudo dpkg --set-selections