Ignore apt-get postinstall scripts automatically

Solution 1:

Apt gets dpkg to extract the packages afresh each time it installs. You'll have to use dpkg directly and get it to split the process:

apt-get download <package>
sudo dpkg --unpack <package>*.deb
sudo rm /var/lib/dpkg/info/<package>.postinst -f
sudo dpkg --configure <package>
sudo apt-get install -yf #To fix dependencies