I have a need to run dpkg install
, unpack the conf
files, but skip running the postinst
scripts (if it's included in the deb
file).
I've tried to change the SHELL
variable to /usr/bin/true
, but that didn't work. Any other ideas would be great!
According to its man-page dpkg
doesn't have a command-line-option to disable script execution. However, you can achieve what you want with the following commands (taken from this answer from an ubuntu forum):
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With