Debian: How to delay configuration when installing/upgrading

aptaptitudedebian

One of my Debian systems is rarely upgraded. So when it is time to upgrade, there are loads of packages. Right now I basically have to monitor the upgrade, because every 50 packages or so there is a package that needs help deciding if it should keep the config or have a new configuration put in.

My system is really slow, so I would prefer if I could tell the system to deal with as many packages as it can on its own and leave the rest for me.

So what I am looking for is something similar to make -k but for apt-get or aptitude. What I am not looking for is non-interactive configuration of packages: I do want to configure the packages, but I want the system to install/upgrade as many packages as it can before asking me to configure anything. That way I hope to return later, configure a bunch of packages, and the install the remaining (hopefully) few packages.

Edit:

Also it would be nice that when I do return to configure that I can get to configure as many as possible. So it should start by postponing all packages that need configuration and when I return it should prioritize all packages that can be configured at this point.

Best Answer

This should do what you asked; asking the config questions afterward:

$ DEBIAN_PRIORITY=critical
$ export DEBIAN_PRIORITY
$ apt-get upgrade
# Wait a long time.   Should be almost entirely noninteractive.
$ dpkg-reconfigure --default-priority=medium --unseen-only

Alternatively you could try asking all the config questions before:

$ apt-get clean
$ cat >> /etc/apt/apt.conf <<EOF
// Pre-configure all packages before
// they are installed.
DPkg::Pre-Install-Pkgs {
    "dpkg-preconfigure --apt --priority=low";
};
EOF
$ apt-get upgrade
Related Question