I have been running a rolling release distro for a couple of years now and switched from LXDE to GNOME to KDE over the years. As you can imagine over the time a lot of configuration files have been touched and lately the system has just gotten a bunch of small hiccups. GTK themes that have been configured years ago but aren't present any more/don't contain all elements. Configuration for the starting of certain daemons (ssh-askpass) that stopped working, etc... Instead of doing a full re-install (which I hate), I would much rather re-install every package on the system with their default configuration files.

So I am looking for a dpkg or apt command that overwrites whatever configuration files might be present with the configuration files from the package.

Or do you think that is a bad idea? I know that I will have to reconfigure certain things (network-manager, etc...) but I hope that it will still be much less work than a complete re-install.


  • You can purge and install again meta-packages like kde-plasma-desktop, gnome-desktop, etc. (apt-get purge <package>, apt-get install <package>) but I'm not sure that it will solve all you problems, some configs are stored at your local /home/<user>/ folder so you have to remove them manually. So my advise is: make a clean install.
    – kirill-a
    Nov 21, 2014 at 15:21

1 Answer 1


You should take a look at apt-get install --reinstalland specify --force-confmiss as option - but this only reinstalls missing config files. apt-get --purge before will remove those config files.

Explained here: https://askubuntu.com/a/67028/329633 and here: http://www.microkwen.com/2008/09/16/force-apt-get-to-reinstall-config-files/ and here: http://blog.mx17.net/2014/02/14/restore-etc-configuration-file-original-maintainer-version-debian/

EDIT: For user-specific configuration files and so-called dotfiles and -folders in /home the comment from @terdon is much better practice. Basically the ame applies for distro upgrades and fresh installations, or when your desktop or major applications suddenly fail - create a new user, test with it and then migrate your settings in batches (or get to know which can be safely copied over and which are conflicting, with experience you should know which are safe and which are not. Documentation what settings you customize based on a default installation help a lot in making up such a list.)

Also configuration files/folders should never be deleted, renaming/moving them away is totally sufficient and also allows later for diagnosis and comparisons, or for incorporation of old settings into fresh configurations or new user accounts.

  • Did you read all I exlained?
    – switch87
    Nov 21, 2014 at 23:39
  • Sure. See the part about if the systemwide defaults have been changed, an automated way to fix those if probably what the OP wants
    – doktor5000
    Nov 23, 2014 at 11:52

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.