Is it okay to delete the ~/.cache folder?Purpose of '~/.cache' directory and when is it safe to delete?Is it safe to remove files/folders from .cache?How do I determine the total size of a directory (folder) from the command line?How to recover deleted files?How can I access and backup ~/.gvfs and ~/.cache/dconf?How to auto clear cache on ubuntu 17.10?Netbeans cant run project anymore after taking the power from my computer?Can i just remove the ~/.cache directory?I have got garbage in home catalogDeleted .cache folder, how to recover?What is the real usage of my home folder?Ubuntu 12.04 Home folder showing fullHow to cache (more) data on SSD/RAM to avoid spin up?Disable memory cache - real reasonClear .cache Tracker directory in Ubuntu?Why does my system use so much cache?Where is the Mozilla Firefox cache located?Remove or hide desktop folder in ~ (Xubuntu)Items on desktop all disappered, including my Home, from icon listDetermining the source of memory cache usage

Delete multiple columns using awk or sed

Can you use Vicious Mockery to win an argument or gain favours?

What is going on with gets(stdin) on the site coderbyte?

Does the Linux kernel need a file system to run?

Does the reader need to like the PoV character?

awk assign to multiple variables at once

Is there a nicer/politer/more positive alternative for "negates"?

How could a planet have erratic days?

Is this toilet slogan correct usage of the English language?

Is there a way to have vectors outlined in a Vector Plot?

Did the UK lift the requirement for registering SIM cards?

Does Doodling or Improvising on the Piano Have Any Benefits?

Why is the "ls" command showing permissions of files in a FAT32 partition?

What is Cash Advance APR?

When were female captains banned from Starfleet?

Why does Carol not get rid of the Kree symbol on her suit when she changes its colours?

Multiplicative persistence

Why is the Sun approximated as a black body at ~ 5800 K?

Which Article Helped Get Rid of Technobabble in RPGs?

Mimic lecturing on blackboard, facing audience

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

Giving feedback to someone without sounding prejudiced

Stack Interview Code methods made from class Node and Smart Pointers

Change the color of a single dot in `ddot` symbol



Is it okay to delete the ~/.cache folder?


Purpose of '~/.cache' directory and when is it safe to delete?Is it safe to remove files/folders from .cache?How do I determine the total size of a directory (folder) from the command line?How to recover deleted files?How can I access and backup ~/.gvfs and ~/.cache/dconf?How to auto clear cache on ubuntu 17.10?Netbeans cant run project anymore after taking the power from my computer?Can i just remove the ~/.cache directory?I have got garbage in home catalogDeleted .cache folder, how to recover?What is the real usage of my home folder?Ubuntu 12.04 Home folder showing fullHow to cache (more) data on SSD/RAM to avoid spin up?Disable memory cache - real reasonClear .cache Tracker directory in Ubuntu?Why does my system use so much cache?Where is the Mozilla Firefox cache located?Remove or hide desktop folder in ~ (Xubuntu)Items on desktop all disappered, including my Home, from icon listDetermining the source of memory cache usage













145















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?










share|improve this question



















  • 3





    My .cache was 11G

    – cmcginty
    Aug 17 '13 at 0:16






  • 2





    Possible cross site duplicate of: superuser.com/questions/366771/…

    – Ciro Santilli 新疆改造中心 六四事件 法轮功
    Mar 16 '14 at 21:34















145















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?










share|improve this question



















  • 3





    My .cache was 11G

    – cmcginty
    Aug 17 '13 at 0:16






  • 2





    Possible cross site duplicate of: superuser.com/questions/366771/…

    – Ciro Santilli 新疆改造中心 六四事件 法轮功
    Mar 16 '14 at 21:34













145












145








145


24






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?










share|improve this question
















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?







home-directory cache






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 14 mins ago









Kevin Bowen

14.7k155970




14.7k155970










asked Feb 6 '12 at 23:53









AnerAner

726253




726253







  • 3





    My .cache was 11G

    – cmcginty
    Aug 17 '13 at 0:16






  • 2





    Possible cross site duplicate of: superuser.com/questions/366771/…

    – Ciro Santilli 新疆改造中心 六四事件 法轮功
    Mar 16 '14 at 21:34












  • 3





    My .cache was 11G

    – cmcginty
    Aug 17 '13 at 0:16






  • 2





    Possible cross site duplicate of: superuser.com/questions/366771/…

    – Ciro Santilli 新疆改造中心 六四事件 法轮功
    Mar 16 '14 at 21:34







3




3





My .cache was 11G

– cmcginty
Aug 17 '13 at 0:16





My .cache was 11G

– cmcginty
Aug 17 '13 at 0:16




2




2





Possible cross site duplicate of: superuser.com/questions/366771/…

– Ciro Santilli 新疆改造中心 六四事件 法轮功
Mar 16 '14 at 21:34





Possible cross site duplicate of: superuser.com/questions/366771/…

– Ciro Santilli 新疆改造中心 六四事件 法轮功
Mar 16 '14 at 21:34










6 Answers
6






active

oldest

votes


















82














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/*


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


You can then restore from backup if needed.



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






share|improve this answer

























  • I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

    – wjandrea
    Aug 25 '17 at 21:44











  • I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

    – Pablo Bianchi
    Sep 27 '17 at 5:13



















32














It is generally safe to delete it. You might want to close all graphical applications (e.g. banshee, rhythmbox, vlc, software-center, ..) to prevent any confusion of the programs accessing the cache (where did my file go all of a sudden!?).



It can easily have a size of 100+ MB, so if you want to free up disk space, do it.



As already pointed out by BretD and Dylan McCall, the type of files are partial downloads, browser cache, media files like icons, etc, used to speed up future access to the same files.



Another thing to keep in mind: removing an application does not necessarily delete the relevant ~/.cache/removed_prog folder; in this case those files just take space and are not used. Those can definitely be deleted.






share|improve this answer

























  • If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

    – thomasrutter
    Feb 11 '16 at 3:57



















19














I just discovered that my backup disk was filling up with stuff from .cache (I guess applications are cleaning their own cache, but I don't delete backups so it's getting huge). So I'm excluding .cache from my backup list, but I noticed that .cache has stuff from TEN YEARS AGO, software I had forgotten I ever used!



This will delete everything in your .cache that was last accessed more than a year ago



find ~/.cache/ -type f -atime +365 -delete


If you're nervous about running it, this will show you what's going to be deleted:



find ~/.cache/ -depth -type f -atime +365 


I'm using 'access time' for that, you could also try 'creation time' by using -ctime (although I've found many cache files which are years old but still accessed). Thanks to @n33rma for the edit suggestion.






share|improve this answer




















  • 1





    Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

    – Geremia
    Aug 25 '16 at 14:44











  • issue : du ~/.cache | sort -n to see sort by dir size

    – Scott Stensland
    Oct 7 '16 at 16:33



















7














I would recommend not deleting it. I am not a Linux expert (though I hope to be!) and don't know the specifics of the file system structure, but you can examine what exactly is in the folder by going into your home folder and hitting ctrl+h to show hidden folders. You can then go in the .cache folder and see what's in there.



Just from a quick peek on my system I know that banshee stores album art in the cache folder (don't know why exactly), chrome has data in the cache folder, a lot of programs keep logs in the .cache folder, and other stuff.



I am not sure if these files are all just there temporarily for speed increase purposes (like browser cache) or if this "cache" contains files for some other purpose (as the speed increase of browser cache is to counteract excessive use of bandwidth by re-accessing files on a server, whereas there should be no discernible difference in r/w times for a different file location on the hard disk).



I hope someone knows more about this than I do and can give you a better response.






share|improve this answer























  • Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

    – user25656
    Feb 7 '12 at 5:13











  • One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

    – user25656
    Feb 7 '12 at 5:34






  • 32





    The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

    – Dylan McCall
    Feb 7 '12 at 6:41







  • 1





    @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

    – Alois Mahdal
    Nov 25 '13 at 2:33






  • 1





    @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

    – Parthian Shot
    Apr 21 '15 at 5:41


















0














I use Debian. Just open your home folder. Make it to show hidden files. You will see .cache in the folder. Open it and delete all the files you do not need. Sometime malware can lodge itself in the .cache and make your application run erratically. It will not do any harm to your Debian/Ubuntu system but may make it appear that something is really wrong with your system if you are a newbie. If you find something like that happening, you must stop all the applications, delete the contents of the .cache, and then restart your applications.






share|improve this answer


















  • 1





    Can you make this answer more authentic ?

    – rɑːdʒɑ
    Dec 30 '16 at 6:08


















0














Don't delete unless you want a lousy browsing experience. Cache keeps info that remembers






share|improve this answer








New contributor




Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f102046%2fis-it-okay-to-delete-the-cache-folder%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    6 Answers
    6






    active

    oldest

    votes








    6 Answers
    6






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    82














    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/*


    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


    You can then restore from backup if needed.



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






    share|improve this answer

























    • I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

      – wjandrea
      Aug 25 '17 at 21:44











    • I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

      – Pablo Bianchi
      Sep 27 '17 at 5:13
















    82














    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/*


    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


    You can then restore from backup if needed.



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






    share|improve this answer

























    • I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

      – wjandrea
      Aug 25 '17 at 21:44











    • I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

      – Pablo Bianchi
      Sep 27 '17 at 5:13














    82












    82








    82







    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/*


    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


    You can then restore from backup if needed.



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






    share|improve this 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/*


    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


    You can then restore from backup if needed.



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







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 28 '16 at 18:49









    edwinksl

    17.3k125487




    17.3k125487










    answered Sep 28 '12 at 21:20









    PantherPanther

    79.8k14159259




    79.8k14159259












    • I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

      – wjandrea
      Aug 25 '17 at 21:44











    • I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

      – Pablo Bianchi
      Sep 27 '17 at 5:13


















    • I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

      – wjandrea
      Aug 25 '17 at 21:44











    • I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

      – Pablo Bianchi
      Sep 27 '17 at 5:13

















    I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

    – wjandrea
    Aug 25 '17 at 21:44





    I get really nervous about any command that starts rm -rf, so I'd recommend using gvfs-trash ~/.thumbs instead

    – wjandrea
    Aug 25 '17 at 21:44













    I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

    – Pablo Bianchi
    Sep 27 '17 at 5:13






    I wonder why I get permission denied on ./dconf (with du -sh .)? Already read this.

    – Pablo Bianchi
    Sep 27 '17 at 5:13














    32














    It is generally safe to delete it. You might want to close all graphical applications (e.g. banshee, rhythmbox, vlc, software-center, ..) to prevent any confusion of the programs accessing the cache (where did my file go all of a sudden!?).



    It can easily have a size of 100+ MB, so if you want to free up disk space, do it.



    As already pointed out by BretD and Dylan McCall, the type of files are partial downloads, browser cache, media files like icons, etc, used to speed up future access to the same files.



    Another thing to keep in mind: removing an application does not necessarily delete the relevant ~/.cache/removed_prog folder; in this case those files just take space and are not used. Those can definitely be deleted.






    share|improve this answer

























    • If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

      – thomasrutter
      Feb 11 '16 at 3:57
















    32














    It is generally safe to delete it. You might want to close all graphical applications (e.g. banshee, rhythmbox, vlc, software-center, ..) to prevent any confusion of the programs accessing the cache (where did my file go all of a sudden!?).



    It can easily have a size of 100+ MB, so if you want to free up disk space, do it.



    As already pointed out by BretD and Dylan McCall, the type of files are partial downloads, browser cache, media files like icons, etc, used to speed up future access to the same files.



    Another thing to keep in mind: removing an application does not necessarily delete the relevant ~/.cache/removed_prog folder; in this case those files just take space and are not used. Those can definitely be deleted.






    share|improve this answer

























    • If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

      – thomasrutter
      Feb 11 '16 at 3:57














    32












    32








    32







    It is generally safe to delete it. You might want to close all graphical applications (e.g. banshee, rhythmbox, vlc, software-center, ..) to prevent any confusion of the programs accessing the cache (where did my file go all of a sudden!?).



    It can easily have a size of 100+ MB, so if you want to free up disk space, do it.



    As already pointed out by BretD and Dylan McCall, the type of files are partial downloads, browser cache, media files like icons, etc, used to speed up future access to the same files.



    Another thing to keep in mind: removing an application does not necessarily delete the relevant ~/.cache/removed_prog folder; in this case those files just take space and are not used. Those can definitely be deleted.






    share|improve this answer















    It is generally safe to delete it. You might want to close all graphical applications (e.g. banshee, rhythmbox, vlc, software-center, ..) to prevent any confusion of the programs accessing the cache (where did my file go all of a sudden!?).



    It can easily have a size of 100+ MB, so if you want to free up disk space, do it.



    As already pointed out by BretD and Dylan McCall, the type of files are partial downloads, browser cache, media files like icons, etc, used to speed up future access to the same files.



    Another thing to keep in mind: removing an application does not necessarily delete the relevant ~/.cache/removed_prog folder; in this case those files just take space and are not used. Those can definitely be deleted.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:24









    Community

    1




    1










    answered Sep 28 '12 at 20:54









    roschrosch

    5,45411323




    5,45411323












    • If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

      – thomasrutter
      Feb 11 '16 at 3:57


















    • If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

      – thomasrutter
      Feb 11 '16 at 3:57

















    If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

    – thomasrutter
    Feb 11 '16 at 3:57






    If you're going to wipe ~/.cache, best to wipe it all at once (so you don't confuse any application with an inconsistent/partial state), then restart immediately after (just in case some application that uses files in ~/.cache is still running in the background).

    – thomasrutter
    Feb 11 '16 at 3:57












    19














    I just discovered that my backup disk was filling up with stuff from .cache (I guess applications are cleaning their own cache, but I don't delete backups so it's getting huge). So I'm excluding .cache from my backup list, but I noticed that .cache has stuff from TEN YEARS AGO, software I had forgotten I ever used!



    This will delete everything in your .cache that was last accessed more than a year ago



    find ~/.cache/ -type f -atime +365 -delete


    If you're nervous about running it, this will show you what's going to be deleted:



    find ~/.cache/ -depth -type f -atime +365 


    I'm using 'access time' for that, you could also try 'creation time' by using -ctime (although I've found many cache files which are years old but still accessed). Thanks to @n33rma for the edit suggestion.






    share|improve this answer




















    • 1





      Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

      – Geremia
      Aug 25 '16 at 14:44











    • issue : du ~/.cache | sort -n to see sort by dir size

      – Scott Stensland
      Oct 7 '16 at 16:33
















    19














    I just discovered that my backup disk was filling up with stuff from .cache (I guess applications are cleaning their own cache, but I don't delete backups so it's getting huge). So I'm excluding .cache from my backup list, but I noticed that .cache has stuff from TEN YEARS AGO, software I had forgotten I ever used!



    This will delete everything in your .cache that was last accessed more than a year ago



    find ~/.cache/ -type f -atime +365 -delete


    If you're nervous about running it, this will show you what's going to be deleted:



    find ~/.cache/ -depth -type f -atime +365 


    I'm using 'access time' for that, you could also try 'creation time' by using -ctime (although I've found many cache files which are years old but still accessed). Thanks to @n33rma for the edit suggestion.






    share|improve this answer




















    • 1





      Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

      – Geremia
      Aug 25 '16 at 14:44











    • issue : du ~/.cache | sort -n to see sort by dir size

      – Scott Stensland
      Oct 7 '16 at 16:33














    19












    19








    19







    I just discovered that my backup disk was filling up with stuff from .cache (I guess applications are cleaning their own cache, but I don't delete backups so it's getting huge). So I'm excluding .cache from my backup list, but I noticed that .cache has stuff from TEN YEARS AGO, software I had forgotten I ever used!



    This will delete everything in your .cache that was last accessed more than a year ago



    find ~/.cache/ -type f -atime +365 -delete


    If you're nervous about running it, this will show you what's going to be deleted:



    find ~/.cache/ -depth -type f -atime +365 


    I'm using 'access time' for that, you could also try 'creation time' by using -ctime (although I've found many cache files which are years old but still accessed). Thanks to @n33rma for the edit suggestion.






    share|improve this answer















    I just discovered that my backup disk was filling up with stuff from .cache (I guess applications are cleaning their own cache, but I don't delete backups so it's getting huge). So I'm excluding .cache from my backup list, but I noticed that .cache has stuff from TEN YEARS AGO, software I had forgotten I ever used!



    This will delete everything in your .cache that was last accessed more than a year ago



    find ~/.cache/ -type f -atime +365 -delete


    If you're nervous about running it, this will show you what's going to be deleted:



    find ~/.cache/ -depth -type f -atime +365 


    I'm using 'access time' for that, you could also try 'creation time' by using -ctime (although I've found many cache files which are years old but still accessed). Thanks to @n33rma for the edit suggestion.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 19 '17 at 0:48

























    answered Feb 11 '16 at 3:51









    andrew lorienandrew lorien

    445410




    445410







    • 1





      Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

      – Geremia
      Aug 25 '16 at 14:44











    • issue : du ~/.cache | sort -n to see sort by dir size

      – Scott Stensland
      Oct 7 '16 at 16:33













    • 1





      Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

      – Geremia
      Aug 25 '16 at 14:44











    • issue : du ~/.cache | sort -n to see sort by dir size

      – Scott Stensland
      Oct 7 '16 at 16:33








    1




    1





    Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

    – Geremia
    Aug 25 '16 at 14:44





    Exactly my issue, too! My daily backups were consistently ~1.7GB. Now that I deleted ~/.cache, they're only ~0.1 GB! Good suggestion re: the -atime flag, too. What I do is put a similar find command in my crontab, also for my /tmp/ folder; I use -atime +1 with no problems.

    – Geremia
    Aug 25 '16 at 14:44













    issue : du ~/.cache | sort -n to see sort by dir size

    – Scott Stensland
    Oct 7 '16 at 16:33






    issue : du ~/.cache | sort -n to see sort by dir size

    – Scott Stensland
    Oct 7 '16 at 16:33












    7














    I would recommend not deleting it. I am not a Linux expert (though I hope to be!) and don't know the specifics of the file system structure, but you can examine what exactly is in the folder by going into your home folder and hitting ctrl+h to show hidden folders. You can then go in the .cache folder and see what's in there.



    Just from a quick peek on my system I know that banshee stores album art in the cache folder (don't know why exactly), chrome has data in the cache folder, a lot of programs keep logs in the .cache folder, and other stuff.



    I am not sure if these files are all just there temporarily for speed increase purposes (like browser cache) or if this "cache" contains files for some other purpose (as the speed increase of browser cache is to counteract excessive use of bandwidth by re-accessing files on a server, whereas there should be no discernible difference in r/w times for a different file location on the hard disk).



    I hope someone knows more about this than I do and can give you a better response.






    share|improve this answer























    • Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

      – user25656
      Feb 7 '12 at 5:13











    • One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

      – user25656
      Feb 7 '12 at 5:34






    • 32





      The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

      – Dylan McCall
      Feb 7 '12 at 6:41







    • 1





      @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

      – Alois Mahdal
      Nov 25 '13 at 2:33






    • 1





      @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

      – Parthian Shot
      Apr 21 '15 at 5:41















    7














    I would recommend not deleting it. I am not a Linux expert (though I hope to be!) and don't know the specifics of the file system structure, but you can examine what exactly is in the folder by going into your home folder and hitting ctrl+h to show hidden folders. You can then go in the .cache folder and see what's in there.



    Just from a quick peek on my system I know that banshee stores album art in the cache folder (don't know why exactly), chrome has data in the cache folder, a lot of programs keep logs in the .cache folder, and other stuff.



    I am not sure if these files are all just there temporarily for speed increase purposes (like browser cache) or if this "cache" contains files for some other purpose (as the speed increase of browser cache is to counteract excessive use of bandwidth by re-accessing files on a server, whereas there should be no discernible difference in r/w times for a different file location on the hard disk).



    I hope someone knows more about this than I do and can give you a better response.






    share|improve this answer























    • Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

      – user25656
      Feb 7 '12 at 5:13











    • One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

      – user25656
      Feb 7 '12 at 5:34






    • 32





      The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

      – Dylan McCall
      Feb 7 '12 at 6:41







    • 1





      @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

      – Alois Mahdal
      Nov 25 '13 at 2:33






    • 1





      @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

      – Parthian Shot
      Apr 21 '15 at 5:41













    7












    7








    7







    I would recommend not deleting it. I am not a Linux expert (though I hope to be!) and don't know the specifics of the file system structure, but you can examine what exactly is in the folder by going into your home folder and hitting ctrl+h to show hidden folders. You can then go in the .cache folder and see what's in there.



    Just from a quick peek on my system I know that banshee stores album art in the cache folder (don't know why exactly), chrome has data in the cache folder, a lot of programs keep logs in the .cache folder, and other stuff.



    I am not sure if these files are all just there temporarily for speed increase purposes (like browser cache) or if this "cache" contains files for some other purpose (as the speed increase of browser cache is to counteract excessive use of bandwidth by re-accessing files on a server, whereas there should be no discernible difference in r/w times for a different file location on the hard disk).



    I hope someone knows more about this than I do and can give you a better response.






    share|improve this answer













    I would recommend not deleting it. I am not a Linux expert (though I hope to be!) and don't know the specifics of the file system structure, but you can examine what exactly is in the folder by going into your home folder and hitting ctrl+h to show hidden folders. You can then go in the .cache folder and see what's in there.



    Just from a quick peek on my system I know that banshee stores album art in the cache folder (don't know why exactly), chrome has data in the cache folder, a lot of programs keep logs in the .cache folder, and other stuff.



    I am not sure if these files are all just there temporarily for speed increase purposes (like browser cache) or if this "cache" contains files for some other purpose (as the speed increase of browser cache is to counteract excessive use of bandwidth by re-accessing files on a server, whereas there should be no discernible difference in r/w times for a different file location on the hard disk).



    I hope someone knows more about this than I do and can give you a better response.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 7 '12 at 0:18









    BretDBretD

    6431611




    6431611












    • Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

      – user25656
      Feb 7 '12 at 5:13











    • One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

      – user25656
      Feb 7 '12 at 5:34






    • 32





      The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

      – Dylan McCall
      Feb 7 '12 at 6:41







    • 1





      @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

      – Alois Mahdal
      Nov 25 '13 at 2:33






    • 1





      @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

      – Parthian Shot
      Apr 21 '15 at 5:41

















    • Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

      – user25656
      Feb 7 '12 at 5:13











    • One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

      – user25656
      Feb 7 '12 at 5:34






    • 32





      The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

      – Dylan McCall
      Feb 7 '12 at 6:41







    • 1





      @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

      – Alois Mahdal
      Nov 25 '13 at 2:33






    • 1





      @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

      – Parthian Shot
      Apr 21 '15 at 5:41
















    Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

    – user25656
    Feb 7 '12 at 5:13





    Yes, I agree that it isn't a good idea to delete .cache. If possible, use the program that creates the relevant folder. Deleting Chrome's cache, for example, should preferably be done via Chrome. If a program doesn't offer a visible means of managing its cache, it may be safer to leave it alone unless one really knows.

    – user25656
    Feb 7 '12 at 5:13













    One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

    – user25656
    Feb 7 '12 at 5:34





    One more thing you could consider if you don't dislike using the terminal and typing commands is this: du ~/.cache > cachefolders_size. What it does is to give you a list with sizes of each folder in .cache. You can paste the information from the file generated into a spreadsheet and then sort it to your taste. I read about it here.

    – user25656
    Feb 7 '12 at 5:34




    32




    32





    The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

    – Dylan McCall
    Feb 7 '12 at 6:41






    The idea of .cache is that it is deletable (see standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Applications shouldn't depend on it, and I really have never noticed an application doing it wrong. Banshee is indeed a funny case, but it's a great example: BretD is right that you probably won't want to delete all your cache, because it is generally there for a good reason. It takes a long time for Banshee to get cover art. It can do it again, but it will look ugly in the interim.

    – Dylan McCall
    Feb 7 '12 at 6:41





    1




    1





    @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

    – Alois Mahdal
    Nov 25 '13 at 2:33





    @vasa1 or you can use a GUI-based disk usage analyzer. I think Baobab, should be available on Ubuntu (I use it in Debian)

    – Alois Mahdal
    Nov 25 '13 at 2:33




    1




    1





    @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

    – Parthian Shot
    Apr 21 '15 at 5:41





    @DylanMcCall That link to the standard makes your comment more useful than all the other answers. If you made that comment an answer, I'd upvote it.

    – Parthian Shot
    Apr 21 '15 at 5:41











    0














    I use Debian. Just open your home folder. Make it to show hidden files. You will see .cache in the folder. Open it and delete all the files you do not need. Sometime malware can lodge itself in the .cache and make your application run erratically. It will not do any harm to your Debian/Ubuntu system but may make it appear that something is really wrong with your system if you are a newbie. If you find something like that happening, you must stop all the applications, delete the contents of the .cache, and then restart your applications.






    share|improve this answer


















    • 1





      Can you make this answer more authentic ?

      – rɑːdʒɑ
      Dec 30 '16 at 6:08















    0














    I use Debian. Just open your home folder. Make it to show hidden files. You will see .cache in the folder. Open it and delete all the files you do not need. Sometime malware can lodge itself in the .cache and make your application run erratically. It will not do any harm to your Debian/Ubuntu system but may make it appear that something is really wrong with your system if you are a newbie. If you find something like that happening, you must stop all the applications, delete the contents of the .cache, and then restart your applications.






    share|improve this answer


















    • 1





      Can you make this answer more authentic ?

      – rɑːdʒɑ
      Dec 30 '16 at 6:08













    0












    0








    0







    I use Debian. Just open your home folder. Make it to show hidden files. You will see .cache in the folder. Open it and delete all the files you do not need. Sometime malware can lodge itself in the .cache and make your application run erratically. It will not do any harm to your Debian/Ubuntu system but may make it appear that something is really wrong with your system if you are a newbie. If you find something like that happening, you must stop all the applications, delete the contents of the .cache, and then restart your applications.






    share|improve this answer













    I use Debian. Just open your home folder. Make it to show hidden files. You will see .cache in the folder. Open it and delete all the files you do not need. Sometime malware can lodge itself in the .cache and make your application run erratically. It will not do any harm to your Debian/Ubuntu system but may make it appear that something is really wrong with your system if you are a newbie. If you find something like that happening, you must stop all the applications, delete the contents of the .cache, and then restart your applications.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 30 '16 at 5:51









    Goldin R. BennetGoldin R. Bennet

    1




    1







    • 1





      Can you make this answer more authentic ?

      – rɑːdʒɑ
      Dec 30 '16 at 6:08












    • 1





      Can you make this answer more authentic ?

      – rɑːdʒɑ
      Dec 30 '16 at 6:08







    1




    1





    Can you make this answer more authentic ?

    – rɑːdʒɑ
    Dec 30 '16 at 6:08





    Can you make this answer more authentic ?

    – rɑːdʒɑ
    Dec 30 '16 at 6:08











    0














    Don't delete unless you want a lousy browsing experience. Cache keeps info that remembers






    share|improve this answer








    New contributor




    Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0














      Don't delete unless you want a lousy browsing experience. Cache keeps info that remembers






      share|improve this answer








      New contributor




      Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        0












        0








        0







        Don't delete unless you want a lousy browsing experience. Cache keeps info that remembers






        share|improve this answer








        New contributor




        Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        Don't delete unless you want a lousy browsing experience. Cache keeps info that remembers







        share|improve this answer








        New contributor




        Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 59 mins ago









        Rudi SimonRudi Simon

        1




        1




        New contributor




        Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Rudi Simon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f102046%2fis-it-okay-to-delete-the-cache-folder%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

            Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

            Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»