I know I can use this to remove a package but keep configuration:
sudo apt-get remove $package
I know I can also use this to remove a package and discard its configuration files:
sudo apt-get purge $package
But what if I want to keep a package but discard its configuration?
Context: I did something wrong with Network Manager and it's started segfaulting on a loop, and while sudo service network-manager stop
works, I also kinda want to use WiFi. If this was just any old boring package, I could just purge and reinstall it. That's obviously not an option for Network Manager, since ubuntu-desktop depends on it.
sudo apt-get install --reinstall $package
does?/etc
or in your home folder? I believe you mean the configuration in your home folder. I'm right?install --reinstall
was sufficient to stop the desperate segfaulting, at least until I tried to reconnect with the offending WiFi network again.install --reinstall
in my answer. ;)