Steps assume that python
(>=3.6) and pip
are already installed.
$ pip install dotclean
Install directly from github
:
$ pip install git+https://github.com/amstelchen/DotClean#egg=DotClean
When completed, run it with:
$ dotclean [...]
$ dotclean -h
usage: dotclean [-h] [-f] [-d] [-x days] [-n] [-c days] [-v]
List and clean old or unused dotfiles/dotdirs,
options:
-h, --help show this help message and exit
-f, --files only apply to files
-d, --directories only apply to directories
-x days, --exclude days
exclude files not older than {x} days
-n, --nocolor disable colored output
-c days, --clean days
clean files older than {x} days (DANGEROUS!)
-v, --version show program's version number and exit
Setting the environment variable DOTCLEAN
enables the program to really wipe entire files and directories, even if they are not empty. USE WITH CAUTION!
Listing directories in ~/.config:
Set a limit in days on files which are quite old:
Set env DOTCLEAN=1
to arm the file deleter: