Install the required package once manually, going through the configuration options you want. Then, do the following:

$ sudo apt install debconf-utils
$ sudo debconf-get-selections | grep MYPKG > MYPKG.CONF

To be able to re-install MYPKG to a new machine without any user input, copy the MYPKG.CONF file to the new machine and do the following:

$ sudo cat MYPKG.CONF | while read line; do echo "$line" | debconf-set-selections; done
$ sudo DEBIAN_FRONTEND=noninteractive dpkg -i MYPKG.deb

Tada! The package has been installed with the right configuration options without any user input.

I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time, just drop me a line to hire me.

Leave a Reply

Your email address will not be published. Required fields are marked *