Pacman creates .pacsave files when removing packages using modified configuration files. These contain configuration settings backups. If a package install/upgrade encounters a non-owned configuration file, it is saved as .pacorig and replaced.
We can configure pacman in /etc/pacman.conf by uncommenting options. Use a text editor like nvim.
When removing packages, pacman keeps critical configuration files as .pacsave. To prevent this, use the -n option. Note pacman won’t remove configurations created by the application itself.
Consider aliasing pacman in your shell configuration file so you only have to type “pacman”. This works for any command on any Linux distribution.
In addition to .pacsave files, you can fully remove a package and all its configurations with pacman -Rns. Be careful with this. To view all installed files by a package, use pacman -Ql.
Many new Arch users are unaware of needing to handle .pacnew/.pacsave files, what they are, and why it’s important. The Arch Wiki explains this in more detail.