this post was submitted on 03 Dec 2023
8 points (90.0% liked)

Linux

48328 readers
636 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Alt TextA screenshot of a file manager preview window for my ~/.cache folder, which takes up 164.3 GiB and has 246,049 files and 15,126 folders. The folder was first created about 1.75 years ago with my system

you are viewing a single comment's thread
view the rest of the comments
[–] bizdelnick@lemmy.ml 2 points 11 months ago* (last edited 11 months ago) (1 children)

You don't have to clean your ~/.cache every now and then. You have to figure out which program eats so much space there, ensure that it is not misconfigured and file a bugreport.

[–] redd@discuss.tchncs.de 1 points 11 months ago (2 children)

So OP's headline should be saying instead: Reminder to CHECK your ~/.cache folder every now and then

[–] cupcakezealot@lemmy.blahaj.zone 2 points 11 months ago (1 children)

just symlink ~/.cache to /dev/null

[–] KSPAtlas@sopuli.xyz -2 points 11 months ago (1 children)

Cache exists for a reason, that sounds like itd break programs, a safer method is probably having it be a ramdisk

[–] bizdelnick@lemmy.ml 0 points 11 months ago (1 children)

Check? Why?

% du -sh ~/.cache
1,6G    /home/bizdelnick/.cache

I don't remember if I ever cleaned it up. Probably a couple years ago when I moved my old HDD to new PC with freshly installed OS. It does not grow accidentally. Only in some very rare cases. As well as some other dirs under ~ and var. If it is a critical system, set up monitoring of free filesystem space. If not, you will notice if it becomes full (I can't remember when this happened to me last time, maybe ~15 years ago when some log file started to grow because of endless error messages).

[–] redd@discuss.tchncs.de 0 points 11 months ago* (last edited 11 months ago) (1 children)

Because some users experienced accidential grows like OP had 160 Gbyte. So general advice for linux users can be stated as: Check your ~/.cache every now and then

Critical systems/servers shall better be monitored as you suggest.

[–] bizdelnick@lemmy.ml 2 points 11 months ago (1 children)

Some users experienced accidential growth of /var/log. Some users experienced accidential growth of /var/cache. Some users experienced accidential growth of /var/lib. Some users experienced accidential growth of ~/.xsession-errors. Shall I continue?

Does every user need to begin his day checking all that places? No, he does not. It is waste of time. Such situations are extremely rare. If you are paranoid, check df to see if you have enough free space, and only if it unpredictably shrinked begin to ivestigate which directory has grown.

[–] redd@discuss.tchncs.de 1 points 11 months ago

I don't get your point. Why should somebody do this every day?

As the experience from other users in this thread, it seems not extremely rare to have an overgrown ~/.cache/ folder. So checking it from time to time is a good advice. If we all do this for a time, and create bug tickets for software which is not cleaning up. Then this problem will hopefully go away with future software releases.