19

I was recently given an answer to another question Help: “aptd” is maxing out my CPU? which included running the commands

sudo dpkg-reconfigure -phigh -a 

and

sudo dpkg --configure -a

That all seems reasonable but I was curious about a few things.

What is dpkg-reconfigure and what do the -phigh -a flags mean?

How is it different from dpkg --configure?

16

From man dpkg

   --configure package...|-a|--pending
          Configure a package which has been unpacked but not yet  config‐
          ured.   If  -a  or  --pending  is  given instead of package, all
          unpacked but unconfigured packages are configured.

          Configuring consists of the following steps:

          1.  Unpack  the  conffiles, and at the same time back up the old
          conffiles, so that they can be restored if something goes wrong.

          2. Run postinst script, if provided by the package.

From man dpkg-reconfigure

   dpkg-reconfigure - reconfigure an already installed package

   -pvalue, --priority=value
       Specify the minimum priority of question that will be displayed.
       dpkg-reconfigure normally shows low priority questions no matter
       what your default priority is. See debconf(7) for a list.

   -a, --all
       Reconfigure all installed packages that use debconf. Warning: this
       may take a long time.

Here dpkg --configure -a will configure all unpacked but unconfigured packages. whereas dpkg-reconfigure -phigh -a will reconfigure all installed packages that use debconf with high priority.

  • 3
    Please be warned that the "-a" "--all" options are not available since 15.10 release and up, as I found trying to use it on 16.04. askubuntu.com/questions/775328/… – linux64kb Apr 8 '17 at 10:19
  • 1
    I'm still a tad confused, though. So what exactly does dpkg-reconfigure do to the package when it "reconfigures" it? I saw the first answer where it says dpkg-reconfigure on this site:superuser.com/questions/1153203/…. What happens to resolvconf when it's reconfigured? – Samuel L. Jun 21 '17 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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