DEV Community

Stack All Flow
Stack All Flow

Posted on • Originally published at stackallflow.com on

Is It Okay to Delete the ~/.Cache Folder in Ubuntu?

cachehome-directory

When I use disk usage analyzer and scan my home folder, the .cache folder in my home directory always shows up with a decent bit of things in it.

Would it be okay for me to delete the contents of this folder or would it damage something?

Accepted Answer

To answer the question, IMO you can delete all of .cache with no long term detrimental effects.

If your .cache is growing large, it might be better to look at the contents and determine what application is making it large and re-configure a bad acting application (rather than simply deleting .cache when it grows too large).

Another directory that can take up a lot of space (and/or save an embarrassing bit of evidence) is the .thumbs directory. Many files in .thumbs seem to be duplicates.

To clean (just take care with the -rf flag and other directories 😉

rm -rf ~/.thumbs/*

Enter fullscreen mode Exit fullscreen mode

When you are new to Ubuntu/Linux it is hard to know what you can and can not delete in your home directory. For the most part you can delete most anything in your home directory, programs or applications that require .cache (or other dot files such as .local) will re-create them.

Most of the time, at worst, you will lose custom configurations, but no real harm to the system.

I would not advise you start a habit of deleting things you do not understand in your home directory, back it up or use a test account. If in doubt, the safe thing would be to make a back up or move the file.

mv .cache .cache_backup

Enter fullscreen mode Exit fullscreen mode

You can then restore from backup if needed.

Definitely do NOT start deleting things you do not understand outside of your home directory.

The post Is It Okay to Delete the ~/.Cache Folder in Ubuntu? appeared first on Stack All Flow.

Top comments (0)