You are not logged in.
Is there any method, program, pacman operation, anything, to reinstall a program and remove all of its modified configurations and restore the original ones? I need to restore a couple of programs to their original state since I modified their configs a lot and if I try to remove them then reinstall the program, it won't work. Any help?
Offline
If they were system wide configuration files that are part of a pacman package you will get .pacnew/.pacsave files on reinstallation/removal, you can use pacman -Qkk to identify modified files and subsequently remove/reinstall them. But I doubt this is what you're asking.
Please be specific, what program, which configuration files, if you've adjusted them, what prevents you from deleting/moving away your adjustments? If it's configuration in your home directory you can usually just remove these and they will be regenerated on start. But identifying these requires knowledge of what the program is and is doing.
Last edited by V1del (2020-06-20 11:33:48)
Offline
Well, I asked this in a more general way since I have encountered this problem before as well and I wanted to see if there's any general solution like (probably) apt-get purge on Debian-based systems, but MariaDB and nginx determined me to ask this time. I found out by myself that for MariaDB I only have to remove the /var/lib/mysql folder, but nginx doesn't really work anymore after removing /etc/nginx and /usr/share/nginx. I can't even start it anymore using systemctl.
Offline
They will be properly reinstated if you reinstall the nginx package. The closes to a apt purge is a
pacman -Rncin the case of nginx this will remove the package and things depending on it, leaving no configuration files behind (but even if you don't specify the -n it will leave .pacsave files that do not conflict with reinstated default configs)
Offline
Well it did the same thing. It still wasn't starting
But, I looked at the status of it and I found out that it doesn't find the file /etc/nginx/mime.types, and I quite literally ran touch /etc/nginx/mime.types and it works now. So... problem solved? I'm not so sure
Offline
So you manually deleted file managed by pacman and belonging to packages that you had installed ... then those packages stopped working. Why is this a suprise? You should not have used `touch' to create an empty mime.types, you should have reinstalled any packages you broke when you deleted tracked files.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I just said I tried reinstalling and it didn't bring back all the files, so that's why I did that
EDIT: To bring back the file, I installed nginx on my computer and I got the file back
Last edited by Andy3153 (2020-06-20 13:38:58)
Offline
pacman -Qo /etc/nginx/mime.types
Figure out what you should have reinstalled.
Offline
And more generally `sudo pacman -Qkq` to see other likely broken packages if you've been removing tracked files.
Last edited by Trilby (2020-06-20 14:13:01)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline