just_another_person,

This particular folder caches many things from various package managers. Won’t hurt to clear, but will fill up again. Maybe consider not using caches when engaging such things.

bizdelnick,

Package managers don’t use this directory as well as any other subdirectory of user’s home.

just_another_person,

Could have fooled me, because it’s certainly the default for things like brew, flatpak, mpm, and pip. Looks like npm and maven use it on certain Debian based distros as well. I’m betting more of the immutable distros use that directory as well vs something in /var/cache.

bizdelnick,

Ah, sorry, I thought about system package managers like apt, dnf, zypper etc.

elbarto777,

How?

just_another_person,

Depends on the package manager. Check options for whatever you’re running.

ryannathans,

Can hurt to clear, there’s a lot more than just package managers using it

just_another_person,

It’s a cache folder. Created by the distro. They labelled it as such because it’s cache, and can be considered ephemeral. It won’t do any permanent damage to anything unless you’ve accidentally been using it for something else.

sunred,
@sunred@discuss.tchncs.de avatar

du -sh ~/.cache/* | sort -h

therealjcdenton,
lntl, (edited )

$ crontab -e

      • */2 * rm -rf /home/lntl/.cache
vox, (edited )
@vox@sopuli.xyz avatar

seems like a bug in one of rhe programs you’re using.
modt software automatically manages it’s cache…
are you using build caching tools such as Mozilla sccache? These tend to create 20gb+ cache directories, especially if used with debug builds

HiddenLayer5, (edited )
@HiddenLayer5@lemmy.ml avatar

I just map both the user cache and the /tmp directory to a RAM drive. I allocated 4 GB but in practice it never gets even close to that much, and Linux seems to not be reserving the entire 4 GB at boot so I would assume how much RAM is used depends on how much is actually in your cache.

It also defers cache and tempfile related problems to turning it off and on again.

majestic,

No way. If i clean up my .cache directory my precious cached with sccache rust deps would be very upset. >:[

nick,

That’s not very cache money of you

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #