clean-home

DEPRECATED: Keep your $HOME clean by finding old conf files

BSD-3-CLAUSE License

Downloads
4.4K
Stars
4

WARNING: This project is at an early stage of development and the database of packages/programs is nearly empty. Thus, it will not work very well yet, but you can help improve it.

This program scans your $HOME dir and checks each element whose name begins with . (dot) against a database of know configuration files. From that, it determines the program (or the package name, if you use search-by-package) that may need that file/dir, and checks whether that program is installed in your system.

There are two ways of finding programs:

  1. By program name: searches for the config filepath in a DB of program names. If a program is found, it checks whether that program exists with which.

  2. By package name: searches for the config filepath in a DB of package names. If a package is found, it checks whether that package is installed with apt-get. This makes clean-home dependent on Debian/Deb-based OSs. I'll work to get that fixed. You can request that clean-home uses a different tool by providing the name and args to be passed to that tool. By default, an empty result is considered a fail and a non-empty result is conceived as a match, but you can request to use the exit code to determine whether packages are installed or not.

Run clean-home --help to see the complete set of options that clean-home accepts.


How to improve the results:

clean-home keeps two files in its data directory with the config file - program/package correspondences. They can be located in the program's share dir, under the names PkgList and PrgList.

If you install this in your home, they will be in: ~/.cabal/share/clean-home-0.0.3/data/ (assuming that you have version 0.0.3 installed)

The only thing you have to do now is add more entries to that file.

The format of this file is very simple: it's a haskell value of type [ (String, [ String ]) ]

Add/remove/modify entries as you want to tweak it to your needs. Once you got a decent configuration, make sure that you send me the file, by email or pull request, so that I add your entries to the next version of clean-home.

Thanks for taking part in this experiment and... go clean your $HOME!!!