We have a script we is installing multiple packages, but should skip any actions in postinstall scripts.

I tried this:

touch /var/lib/dpkg/info/packagename.postinst
chmod +x /var/lib/dpkg/info/packagename.postinst
/usr/bin/apt-get --force-yes --assume-yes install packagename

But it seems to ovewrite /var/lib/dpkg/info/packagename.postinst

share|improve this question

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.