You are not logged in.

#1 2022-01-29 20:23:12

Pezhman
Member
Registered: 2022-01-19
Posts: 63

[SOLVED]Is it safe to remove ".cache" directory in home folder?

Hello everone
I found a cache folder in my home directory and it countains 8GB of data.
Is it safe to remove it?
when I install something and then I remove it I can reinstall it without downloading it again.
so I want to remove cache folder to free up space.
pacman just saves everything which is a good thing but I want to clear cache weekly.
what should i do?

Last edited by Pezhman (2022-02-01 06:46:10)

Offline

#2 2022-01-29 20:24:54

aflyingpumpkin
Member
Registered: 2021-02-12
Posts: 14

Re: [SOLVED]Is it safe to remove ".cache" directory in home folder?

I have deleted my .cache folder a couple of times and it has never caused issue. I would make sure that no programs that are using the cache folder are running, also make sure that you do not accidentally delete your .config folder (as stupid as this is, I have done this before.)

Offline

#3 2022-01-29 21:10:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,101

Re: [SOLVED]Is it safe to remove ".cache" directory in home folder?

The .cache folder in your home dir is not the one that pacman will be using though, so if it's your goal to clear the pacman cache then you need to do https://wiki.archlinux.org/title/Pacman … kage_cache

Chances are .cache is so big because you use yay or paru or so, in which case these have their own integrations for their own caches with to appropriate -Sc command

Offline

#4 2022-01-29 21:39:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED]Is it safe to remove ".cache" directory in home folder?

To build on the above, you may just want to check what's in ~/.cache and remove what you don't have use for.  It's always safe to delete any of that content, but much of it is useful and will just be recreated the next time the relevant program runs.  In the end this will not really save space but will slow down those programs as they have to redownload any (formerly-)cached data.

But if you look what's in there, you'll likely see directories for programs you no longer use and may no longer have installed.  By all means delete those.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2022-01-30 16:49:46

Pezhman
Member
Registered: 2022-01-19
Posts: 63

Re: [SOLVED]Is it safe to remove ".cache" directory in home folder?

Thanks everyone
I cleared my cache with yay -Scc and freed a lot of space.
is there more ways to free up space?

Offline

Board footer

Powered by FluxBB