Force apt-get to reinstall config files

apt-get -o DPkg::options::=--force-confmiss --reinstall install <package>

Update: apt-get only reinstalls missing config files. You can use dpkg --purge <package> to remove the config files before reinstalling the package.

9 thoughts on “Force apt-get to reinstall config files

  1. skanx Post author

    Thanks, I updated the “post”. You can still use dpkg --purge <package> to remove config files from a package, before reinstalling the package with --force-confmiss.

  2. anonymous

    apt-get -o DPkg::options::=–force-confmiss –reinstall install pulseaudio

    not work for me.
    /etc/pulse/ still have my changes.
    Ubuntu 12.10

    Try yourself.

  3. skanx Post author


    /etc/pulse/ still have my changes.

    Did you try uninstalling completely pulseaudio and all its files?
    dpkg --purge pulseaudio

    Is the file /etc/pulse/ owned by the pulseaudio package?
    I don’t have an Ubuntu system atm to try this on, sorry.

  4. skanx Post author

    Sorry, I don’t know how to do that automatically.
    Maybe download the deb file and extract the configuration files manually?

  5. Ratchanan Srirattanamet

    Is it possible to just delete config file and reinstall package using above command?

  6. Skippy

    It appears some of the other solutions won’t work if the configuration files of the package are managed with ucf.

    In this case you can use :

    UCF_FORCE_CONFFMISS=1 apt-get –reinstall install [pkgname]

Leave a Reply

Your email address will not be published.