Purgeconfig – A safer way to reset configuration files

Sponsored Link
Many people try purging packages and reinstalling them to reset them, but it sometimes removes other packages with it, so it becomes a headache (especially when you are trying to reset the X11 configuration files, removing a few hundred packages with it).

To solve these problems, lkjoel made a script called purgeconfig that will artificially reset the configuration files (manually removing the configuration files, marking the packages as purged, then reinstalling the packages).

WARNING: Do NOT run Apt/Aptitude/DPKG/Synaptic/Software Center while running purgeconfig.

Install Purgeconfig on ubuntu

Download and install the script with this command:

wget http://purgeconfig.sf.net/purgeconfig.sh
chmod +x purgeconfig.sh
sudo cp purgeconfig.sh /usr/bin/purgeconfig

Using Purgeconfig

sudo purgeconfig package1 package2 package3 etc...

You can specify the architecture:

sudo purgeconfig package1:i386 etc...

Via Lkubuntu

Sponsored Link

You may also like...

4 Responses

  1. Luca Cerone says:

    It seems like a nice utility…
    I wonder why apt doesn’t have such an option..
    But what about the config files stored in the home
    of each user? would those be restored as well???

  2. Brian says:

    You are awesome! I wasted hours trying to do a clean install of cups before I found this script. I actually tried to purge it first, but the package ubuntu-desktop depends on it!

    It blows my mind that neither apt* nor dpkg can cleanly install a package that is already installed (e.g. a “repair” operation).

  3. Dave says:

    It would be nice if there were an alternate DL link. I am not into signing up for M$ Azure cloud.

    I’ll try and find it elsewhere.

  4. Dave says:

    NM I used the wget and all is fine! LOL

Leave a Reply

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