How do you keep your /home clean

But…why?

Extra file in ~/.config won’t have any material impact on the performance of your system…

1 Like

@dalto
I like it to have a clean folder structure an only the necessary needed files. It’s more about me. Too much disturbance give me an “out of control” feeling.

Your system, your rule!
@Shjim

Having followed through this thread, your best bet seems still to be to delete them manually on a as per case basis.

1 Like

If you want to delete, make sure to backup before deleting

Hi @arcDaniel
I hope this helps.

https://wiki.archlinux.org/title/System_maintenance#Old_configuration_files

image

Are there really 1913 files in the Vivaldi config folder??

The browser cache is probably being kept there.

2 Likes

Yes. And yes, as @dalto mentioned that dir contains everything

1 Like

Mine’s sitting at ~600mb, ~23k files, and that’s with the cache under ~/.cache/vivaldi and linked to tmpfs. That being said, Vivaldi does have cache under ~/.config. This directory contains about half of the storage: ~/.config/vivaldi/Default/Service Worker/CacheStorage

du -s .config 
7.6G	.config

I guess this means I have to open it and check the culprits :smiley:

Thanks for you contribution. So I will clean it by hand.

In the same time it will be a learn process, witch files are used for what. Sadly in the .config folder there are “cryptic” file where I not really now from witch application they are.

but ecosia, is my friend.

My ~/.config size is 569 MiB. If I exclude Discord and Chromium it’s only 7 MiB…

This is a problem I hated on Windows, and it’s still a (albeit less) problem on Linux:
Various programs install config files and data into non-standard places and it infuriates me. Videogames especially have a bad habit of adding new unwanted directories into your home directory.

Currently I don’t really “use” my /home, after I got all my data organized into new ZFS filesystems. So the datasets from those filesystems are currently mounted in /mnt, and if anything is actually important to me, it goes there and not into /home. This will probably change as it’s not the most ergonomic; I might add symlinks in my /home to what I think of as my “real” directories, but I am paranoid of some random program coming along and putting files into one of those directories without me approving. It feels safer to keep them in /mnt.

Some of the top-level directories I have in /mnt right now:

data-exports 
documents
downloads  
ebench  
games  
library  
media  
music-prod  
project  
sysadmin  
work

Nothing here gets muffed up, and nothing gets added that I don’t want.

For ~/.config I use a tool called Chezmoi to manage them. If you have config files you want to back up, and be able to sync to other machines, I would run chezmoi add ~/.config/spectacle/conf, which copies it to a Chezmoi directory. You turn this directory into a git repository, then you can run chezmoi apply and it will update all your config files from the Chezmoi directory (and prevent accidentally overwriting changes). You can also set it to just symlink conf files. When you want to set up a new computer with all your config files, you can do it all in just 1-2 commands; it will pull your git repo and apply all the files.

This isn’t great for any config files that change very often, if keeping them in sync with other computers is important. More complex programs like FreeCAD, Cura, etc. have conf files that change a little bit almost every time you do work in them. Depends on how important it is to not lose changes, and you can do your best to pick and choose to sync only the most important conf files.

About twice a year I check ~/.config, ~/.cache and ~/.local/share, I have an alias for a command that list the 15 biggest directories by size.

alias bigdir="du -hsx */ | sort -rh | head -15"

For example :

cd .config && bigdir         
45M	    mpv/
7,7M	jamesdsp/
4,5M	transmission-daemon/
4,1M	libreoffice/
3,9M	deadbeef/
3,8M	GIMP/
2,0M	Transmission Remote GUI/
1,8M	startpage_dracula/
1,5M	ulauncher/
840K	mednaffe/
700K	gtk-2.0/
508K	ghb/
352K	radiotray-ng/
312K	xfce4/
148K	VirtualBox/

In ~/.local/share/applications, you may find some .desktop files that need to be removed manually.

1 Like

Not a solution, but I turn blind eye on this and set shell default folder to /home/user/home

Programs to /home/user/home/bin my configs to /home/user/home/etc

Current state of user home directory is like managing a zoo…

Anything that lives in .config is whatever; as long as it’s not cluttering my top level HOME directory. It does irritate me when programs store data and not just configuration in there, but I’ve learned to accept that this those standards will not be properly followed by programs in the foreseeable future.

xdg-ninja is an excellent tool that looks for programs storing data in places not following XDG specification, and will try to tell you the corresponding env var or config setting to make the program store to the proper location if possible.

I also use chezmoi to manage my dotfiles (mostly in ~/.config) and sync them across machines. It uses a git repository to store your files, and you can pick and choose which files you want to track and save (eg. chezmoi add ~/.config/spectacle/spectaclerc)

I use a dyson and a swiffer mop. Works great :muscle:

Edit: Seriously, though, I just back up important files to my NAS regularly and couldn’t care less about keeping my /home squeaky clean because at some point I will likely do a clean install anyway to keep things FRESH. Just a habit I have from using Windows for so many years.

like a few here the 20 mb of /.config and 20 mb of /.mozilla negligible for now imo.

the occasional ocd part of my brain will crack open .config a couple times a year and take a gander with your eyeballs at all the folders of apps you played with for a day/stopped using/or uninstalled. they go to the trash immediately and I hunt down the remains (search) of them wherever else they had their tentacles and delete those files too.

to answer your title question: manually with a big stick
2 cents

20 MB for .mozilla???

You must not even have bookmarks in that thing. No cookies, no add-ons, no nothing. :astonished:

I’m at 10 times that amount at minimum - specifically when I only have one profile. But because I have multiple profiles, it’s at 1.1 GB.