The dnf man page discusses autoremove and clean commands, but neither seem to remove package files.
autoremove removes unused packages and clean removes unused repo files. I’m looking for something that removes package files (i.e., files and directories created on install or during use).
How do you identify and remove these files? Is there a way to do this with dnf?
Packages are removed using dnf sudo dnf remove <package name> which removes all the related system files and if necessary directories. The config files for the user are, as stated just above, left for the user to find and remove. Those files will normally be in or under the users home directory or maybe for some may be located under the /etc directory.
Does this mean files put in /etc and /var/lib or similar?
Is there a way to track these files? I understand some are well named and placed, but to speed up the process and boost assurance, is there a tool that tracks which config files belong to which package? Or another way to ask it is, is there a tool that tracks all the files on your system owned by a certain package?
I’d like to automate the process as much as possible.
If those files are modified by user, they are not removed but renamed with .rpmsave extension (to preserve the changes made by the user). If they are not modified, they are removed by dnf remove command.