I manage my dotfiles with Stow and mainly use KDE Plasma, with Konsave for backing up Plasma settings. When I install a new desktop environment or other software to try it out, applications often create configuration files throughout my home directory, especially under .config and other hidden folders. If I later uninstall the software, those files remain behind and leave my home directory cluttered. What is a clean way to test new software or desktop environments while keeping my normal home folder organized and making cleanup easy?
5 Answers
Create a separate user account specifically for testing. Keep it mostly vanilla so you can see how applications behave with default settings and avoid mixing test configuration with your real files. When you are finished, you can delete the account and recreate its home directory from the default skeleton. User switching generally lets you use it without logging out of your main session. This works especially well for testing individual applications or checking whether a problem is caused by your own configuration.
Nix with Home Manager can help if you want to declare and remove the configuration you intentionally manage. Nix by itself mainly handles system packages and configuration; Home Manager is needed for user-level files. It still cannot prevent every program from creating unmanaged files, but it makes declared configuration easier to reproduce and clean up. More advanced setups can use impermanence so untracked state does not survive resets.
For testing a whole desktop environment or anything that might affect the system, use a virtual machine first. It gives you a disposable environment that can be snapshotted and reverted, so none of the test files or settings reach your normal installation.
A package manager's complete-removal option can remove files that belong to the package, but it usually will not delete personal configuration files created in your home directory. Treat it as helpful cleanup, not as a complete solution; backing up your normal account and testing elsewhere is safer.
For a short experiment, a disposable second account is usually more convenient than rebuilding your main configuration. For longer or riskier tests, use a virtual machine or snapshot so you can throw everything away in one step.

Even with declarative tools, applications may create their own cache and configuration files, so a separate account or virtual machine is still the simplest solution for disposable experiments.