Clearing KDE Cache?

I noticed that ~/.cache is about 40GB and I would rather use this space for other things.

Is .cache actually useful, or can I just delete the contents of it? I suspect that it is just old images and stale data.

I think it’s not normal. Try to run $du -shc ~/.cache/* and see which applications use most of the disk space.
Then you can clean it manually (if sure of what you’re doing).

1 Like

~/.cache is used for all sorts of programs, not only kde ones.
Use filelight to check, what programs (folders) are caching such enormous amounts of data.
Or you can do it via terminal:

$ du -shc ~/.cache/* | sort -hr | head -20
1 Like

Probably milion AUR packages. :stuck_out_tongue:

It is being used by lots of things — all of which are related to your user account and the applications you start — in order to speed up loading times.

For instance, all of the image and video thumbnails displayed by Dolphin are stored there, which makes it faster for Dolphin to be able to show you those thumbnails upon opening a folder — without that cache, Dolphin would need to read and scan every file again in order to show you a preview.

Other applications also store data under ~/.cache — even GTK and Electron applications — so it’s not specific to Plasma.

That all said however, it is completely safe to delete the contents of ~/.cache — not the directory itself, though — and I’ve already done that myself many times. The point of a cache is to increase performance, but there isn’t — and should never be — anything in there that cannot be automatically recreated.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.