Ubuntu:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 00000000
Put a package on hold
echo "package hold" | dpkg --set-selections
Remove the hold
echo "package install" | dpkg --set-selections
Store the list of software to a file called /backup/package-selections (restore see aptitude):
dpkg --get-selections >/backup/package-selections
Hold a package using
aptitude hold package_name
Remove the hold with
aptitude unhold package_name
Restore installed software (store see dpkg):
aptitude install $(cat /backup/package-selections | awk '{print $1}')