How to clean /var/cache?












12















When I woke up this morning, I found my root had filled overnight



du -hx --max-depth=1 /

132M /boot
4.0K /media
16K /lost+found
16M /root
702M /lib
4.0K /OLDHOME
8.2G /usr
73M /etc
4.0K /srv
11M /sbin
4.0K /selinux
8.0K /.config
4.0K /cdrom
4.6G /var
181M /opt
4.0K /mnt
9.3M /bin
4.0K /lib64
14G /


The space is used by /var/cache/polipo (2.7G). How can I clean this up safely?

I tried restarts=>didn't work

Used bleachbit=>the space is not detected in the cleanup preview



PS: I did rm -rf youtube inside /var/cache/polipo and it freed up 2G space. Dunno if it was safe though










share|improve this question




















  • 1





    whats that polipo ?

    – rɑːdʒɑ
    Oct 29 '13 at 0:45











  • polipo is a caching proxy

    – avmohan
    Oct 29 '13 at 2:12
















12















When I woke up this morning, I found my root had filled overnight



du -hx --max-depth=1 /

132M /boot
4.0K /media
16K /lost+found
16M /root
702M /lib
4.0K /OLDHOME
8.2G /usr
73M /etc
4.0K /srv
11M /sbin
4.0K /selinux
8.0K /.config
4.0K /cdrom
4.6G /var
181M /opt
4.0K /mnt
9.3M /bin
4.0K /lib64
14G /


The space is used by /var/cache/polipo (2.7G). How can I clean this up safely?

I tried restarts=>didn't work

Used bleachbit=>the space is not detected in the cleanup preview



PS: I did rm -rf youtube inside /var/cache/polipo and it freed up 2G space. Dunno if it was safe though










share|improve this question




















  • 1





    whats that polipo ?

    – rɑːdʒɑ
    Oct 29 '13 at 0:45











  • polipo is a caching proxy

    – avmohan
    Oct 29 '13 at 2:12














12












12








12


6






When I woke up this morning, I found my root had filled overnight



du -hx --max-depth=1 /

132M /boot
4.0K /media
16K /lost+found
16M /root
702M /lib
4.0K /OLDHOME
8.2G /usr
73M /etc
4.0K /srv
11M /sbin
4.0K /selinux
8.0K /.config
4.0K /cdrom
4.6G /var
181M /opt
4.0K /mnt
9.3M /bin
4.0K /lib64
14G /


The space is used by /var/cache/polipo (2.7G). How can I clean this up safely?

I tried restarts=>didn't work

Used bleachbit=>the space is not detected in the cleanup preview



PS: I did rm -rf youtube inside /var/cache/polipo and it freed up 2G space. Dunno if it was safe though










share|improve this question
















When I woke up this morning, I found my root had filled overnight



du -hx --max-depth=1 /

132M /boot
4.0K /media
16K /lost+found
16M /root
702M /lib
4.0K /OLDHOME
8.2G /usr
73M /etc
4.0K /srv
11M /sbin
4.0K /selinux
8.0K /.config
4.0K /cdrom
4.6G /var
181M /opt
4.0K /mnt
9.3M /bin
4.0K /lib64
14G /


The space is used by /var/cache/polipo (2.7G). How can I clean this up safely?

I tried restarts=>didn't work

Used bleachbit=>the space is not detected in the cleanup preview



PS: I did rm -rf youtube inside /var/cache/polipo and it freed up 2G space. Dunno if it was safe though







command-line disk-usage cache cleanup polipo






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 29 '13 at 0:32







avmohan

















asked Oct 29 '13 at 0:21









avmohanavmohan

168228




168228








  • 1





    whats that polipo ?

    – rɑːdʒɑ
    Oct 29 '13 at 0:45











  • polipo is a caching proxy

    – avmohan
    Oct 29 '13 at 2:12














  • 1





    whats that polipo ?

    – rɑːdʒɑ
    Oct 29 '13 at 0:45











  • polipo is a caching proxy

    – avmohan
    Oct 29 '13 at 2:12








1




1





whats that polipo ?

– rɑːdʒɑ
Oct 29 '13 at 0:45





whats that polipo ?

– rɑːdʒɑ
Oct 29 '13 at 0:45













polipo is a caching proxy

– avmohan
Oct 29 '13 at 2:12





polipo is a caching proxy

– avmohan
Oct 29 '13 at 2:12










6 Answers
6






active

oldest

votes


















6














Polipo, a web caching program may store a lot of data in an on-disk cache.



One way to clear this up is to issue the command sudo polipo -x - this will cause polipo to clear the local disk cache.






share|improve this answer



















  • 2





    This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

    – Jeremy Davis
    Oct 12 '17 at 3:09





















30














Method 1:



sudo apt-get autoclean
sudo apt-get autoremove


Method 2:



Launch your bleachbit as root user : no space in disk; sudo apt-get clean not working






share|improve this answer





















  • 3





    All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

    – avmohan
    Oct 29 '13 at 2:13






  • 1





    went from 500M to 300M but somehow not everything...hmm...

    – rogerdpack
    May 8 '17 at 5:10



















3














Try cleaning ubuntu unnecesarry files using bleachbit.
It is a tool that will help you clean your cache, temp files, cookies and it has other features also...



To install it:



sudo apt-get install bleachbit





share|improve this answer



















  • 1





    Unfortunately it appears to be an X windows app, any love for us server command line folk?

    – rogerdpack
    May 8 '17 at 5:09






  • 1





    yes that will work when your disk is full...

    – RickyA
    Jun 13 '17 at 15:19



















3














The most powerful of all commands to clean the cache for command line users is of course



sudo apt clean



Which will also delete all the cached files.






share|improve this answer
























  • I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

    – Nagev
    Oct 2 '18 at 8:51



















0














It sounds so obvious, and yet chances are you haven’t done this.



By default Ubuntu keeps every update it downloads and installs in a cache on your disk, just in case you ever need it again.



This is useful if you regularly add and remove apps, find yourself needing to reconfigure/reinstall a specific package, or simply have a poor connection.



But the flip side is that the apt package cache can quickly swell to several hundred MBs. This command tells you how big your apt cache is:



du -sh /var/cache/apt/archives



To clean the apt cache on Ubuntu simply run the following command.



sudo apt-get clean



The apt clean command removes ALL packages kept in the apt cache, regardless of age or need. If you’re on a slow, capped or intermittent connection you may want to consider skipping this step.



(https://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu)






share|improve this answer








New contributor




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
















  • 1





    It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

    – PerlDuck
    yesterday



















-1














I couldn't find any Ubuntu specific documentation on "/var/cache" although only spent a couple of minutes on it. Based on its name and the answers to a related question, I'm comfortable manually deleting files from there.



First, I had a look at the worst offending applications (directories):



sudo du -hs /var/cache/* | sort -h


And I saw that they were clearly these two:



1.1G    /var/cache/mock
1.5G /var/cache/lxc


I don't plan to use mock or lxc in the next few weeks, so I went ahead and did:



sudo rm -rf /var/cache/mock/*
sudo rm -rf /var/cache/lxc


And all is good.






share|improve this answer























    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%2f367617%2fhow-to-clean-var-cache%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









    6














    Polipo, a web caching program may store a lot of data in an on-disk cache.



    One way to clear this up is to issue the command sudo polipo -x - this will cause polipo to clear the local disk cache.






    share|improve this answer



















    • 2





      This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

      – Jeremy Davis
      Oct 12 '17 at 3:09


















    6














    Polipo, a web caching program may store a lot of data in an on-disk cache.



    One way to clear this up is to issue the command sudo polipo -x - this will cause polipo to clear the local disk cache.






    share|improve this answer



















    • 2





      This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

      – Jeremy Davis
      Oct 12 '17 at 3:09
















    6












    6








    6







    Polipo, a web caching program may store a lot of data in an on-disk cache.



    One way to clear this up is to issue the command sudo polipo -x - this will cause polipo to clear the local disk cache.






    share|improve this answer













    Polipo, a web caching program may store a lot of data in an on-disk cache.



    One way to clear this up is to issue the command sudo polipo -x - this will cause polipo to clear the local disk cache.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 28 '17 at 20:27









    Charles GreenCharles Green

    13.5k73758




    13.5k73758








    • 2





      This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

      – Jeremy Davis
      Oct 12 '17 at 3:09
















    • 2





      This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

      – Jeremy Davis
      Oct 12 '17 at 3:09










    2




    2





    This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

    – Jeremy Davis
    Oct 12 '17 at 3:09







    This is the ONLY right answer to this question (regarding polipo)! Why the hell does it not already have enough votes to make that clear?!?

    – Jeremy Davis
    Oct 12 '17 at 3:09















    30














    Method 1:



    sudo apt-get autoclean
    sudo apt-get autoremove


    Method 2:



    Launch your bleachbit as root user : no space in disk; sudo apt-get clean not working






    share|improve this answer





















    • 3





      All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

      – avmohan
      Oct 29 '13 at 2:13






    • 1





      went from 500M to 300M but somehow not everything...hmm...

      – rogerdpack
      May 8 '17 at 5:10
















    30














    Method 1:



    sudo apt-get autoclean
    sudo apt-get autoremove


    Method 2:



    Launch your bleachbit as root user : no space in disk; sudo apt-get clean not working






    share|improve this answer





















    • 3





      All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

      – avmohan
      Oct 29 '13 at 2:13






    • 1





      went from 500M to 300M but somehow not everything...hmm...

      – rogerdpack
      May 8 '17 at 5:10














    30












    30








    30







    Method 1:



    sudo apt-get autoclean
    sudo apt-get autoremove


    Method 2:



    Launch your bleachbit as root user : no space in disk; sudo apt-get clean not working






    share|improve this answer















    Method 1:



    sudo apt-get autoclean
    sudo apt-get autoremove


    Method 2:



    Launch your bleachbit as root user : no space in disk; sudo apt-get clean not working







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:24









    Community

    1




    1










    answered Oct 29 '13 at 0:42









    rɑːdʒɑrɑːdʒɑ

    57.8k85218302




    57.8k85218302








    • 3





      All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

      – avmohan
      Oct 29 '13 at 2:13






    • 1





      went from 500M to 300M but somehow not everything...hmm...

      – rogerdpack
      May 8 '17 at 5:10














    • 3





      All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

      – avmohan
      Oct 29 '13 at 2:13






    • 1





      went from 500M to 300M but somehow not everything...hmm...

      – rogerdpack
      May 8 '17 at 5:10








    3




    3





    All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

    – avmohan
    Oct 29 '13 at 2:13





    All these were already done. The problem is in /var/cache. I want to know how to clean /var/cache safely.

    – avmohan
    Oct 29 '13 at 2:13




    1




    1





    went from 500M to 300M but somehow not everything...hmm...

    – rogerdpack
    May 8 '17 at 5:10





    went from 500M to 300M but somehow not everything...hmm...

    – rogerdpack
    May 8 '17 at 5:10











    3














    Try cleaning ubuntu unnecesarry files using bleachbit.
    It is a tool that will help you clean your cache, temp files, cookies and it has other features also...



    To install it:



    sudo apt-get install bleachbit





    share|improve this answer



















    • 1





      Unfortunately it appears to be an X windows app, any love for us server command line folk?

      – rogerdpack
      May 8 '17 at 5:09






    • 1





      yes that will work when your disk is full...

      – RickyA
      Jun 13 '17 at 15:19
















    3














    Try cleaning ubuntu unnecesarry files using bleachbit.
    It is a tool that will help you clean your cache, temp files, cookies and it has other features also...



    To install it:



    sudo apt-get install bleachbit





    share|improve this answer



















    • 1





      Unfortunately it appears to be an X windows app, any love for us server command line folk?

      – rogerdpack
      May 8 '17 at 5:09






    • 1





      yes that will work when your disk is full...

      – RickyA
      Jun 13 '17 at 15:19














    3












    3








    3







    Try cleaning ubuntu unnecesarry files using bleachbit.
    It is a tool that will help you clean your cache, temp files, cookies and it has other features also...



    To install it:



    sudo apt-get install bleachbit





    share|improve this answer













    Try cleaning ubuntu unnecesarry files using bleachbit.
    It is a tool that will help you clean your cache, temp files, cookies and it has other features also...



    To install it:



    sudo apt-get install bleachbit






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 8 '14 at 8:47









    jnhghy - Alexandru Janteajnhghy - Alexandru Jantea

    1394




    1394








    • 1





      Unfortunately it appears to be an X windows app, any love for us server command line folk?

      – rogerdpack
      May 8 '17 at 5:09






    • 1





      yes that will work when your disk is full...

      – RickyA
      Jun 13 '17 at 15:19














    • 1





      Unfortunately it appears to be an X windows app, any love for us server command line folk?

      – rogerdpack
      May 8 '17 at 5:09






    • 1





      yes that will work when your disk is full...

      – RickyA
      Jun 13 '17 at 15:19








    1




    1





    Unfortunately it appears to be an X windows app, any love for us server command line folk?

    – rogerdpack
    May 8 '17 at 5:09





    Unfortunately it appears to be an X windows app, any love for us server command line folk?

    – rogerdpack
    May 8 '17 at 5:09




    1




    1





    yes that will work when your disk is full...

    – RickyA
    Jun 13 '17 at 15:19





    yes that will work when your disk is full...

    – RickyA
    Jun 13 '17 at 15:19











    3














    The most powerful of all commands to clean the cache for command line users is of course



    sudo apt clean



    Which will also delete all the cached files.






    share|improve this answer
























    • I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

      – Nagev
      Oct 2 '18 at 8:51
















    3














    The most powerful of all commands to clean the cache for command line users is of course



    sudo apt clean



    Which will also delete all the cached files.






    share|improve this answer
























    • I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

      – Nagev
      Oct 2 '18 at 8:51














    3












    3








    3







    The most powerful of all commands to clean the cache for command line users is of course



    sudo apt clean



    Which will also delete all the cached files.






    share|improve this answer













    The most powerful of all commands to clean the cache for command line users is of course



    sudo apt clean



    Which will also delete all the cached files.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 28 '17 at 20:00









    Corrado TopiCorrado Topi

    671




    671













    • I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

      – Nagev
      Oct 2 '18 at 8:51



















    • I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

      – Nagev
      Oct 2 '18 at 8:51

















    I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

    – Nagev
    Oct 2 '18 at 8:51





    I don't know what this command did but it didn't clear /var/cache, space is nearly double after I ran it!

    – Nagev
    Oct 2 '18 at 8:51











    0














    It sounds so obvious, and yet chances are you haven’t done this.



    By default Ubuntu keeps every update it downloads and installs in a cache on your disk, just in case you ever need it again.



    This is useful if you regularly add and remove apps, find yourself needing to reconfigure/reinstall a specific package, or simply have a poor connection.



    But the flip side is that the apt package cache can quickly swell to several hundred MBs. This command tells you how big your apt cache is:



    du -sh /var/cache/apt/archives



    To clean the apt cache on Ubuntu simply run the following command.



    sudo apt-get clean



    The apt clean command removes ALL packages kept in the apt cache, regardless of age or need. If you’re on a slow, capped or intermittent connection you may want to consider skipping this step.



    (https://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu)






    share|improve this answer








    New contributor




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
















    • 1





      It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

      – PerlDuck
      yesterday
















    0














    It sounds so obvious, and yet chances are you haven’t done this.



    By default Ubuntu keeps every update it downloads and installs in a cache on your disk, just in case you ever need it again.



    This is useful if you regularly add and remove apps, find yourself needing to reconfigure/reinstall a specific package, or simply have a poor connection.



    But the flip side is that the apt package cache can quickly swell to several hundred MBs. This command tells you how big your apt cache is:



    du -sh /var/cache/apt/archives



    To clean the apt cache on Ubuntu simply run the following command.



    sudo apt-get clean



    The apt clean command removes ALL packages kept in the apt cache, regardless of age or need. If you’re on a slow, capped or intermittent connection you may want to consider skipping this step.



    (https://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu)






    share|improve this answer








    New contributor




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
















    • 1





      It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

      – PerlDuck
      yesterday














    0












    0








    0







    It sounds so obvious, and yet chances are you haven’t done this.



    By default Ubuntu keeps every update it downloads and installs in a cache on your disk, just in case you ever need it again.



    This is useful if you regularly add and remove apps, find yourself needing to reconfigure/reinstall a specific package, or simply have a poor connection.



    But the flip side is that the apt package cache can quickly swell to several hundred MBs. This command tells you how big your apt cache is:



    du -sh /var/cache/apt/archives



    To clean the apt cache on Ubuntu simply run the following command.



    sudo apt-get clean



    The apt clean command removes ALL packages kept in the apt cache, regardless of age or need. If you’re on a slow, capped or intermittent connection you may want to consider skipping this step.



    (https://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu)






    share|improve this answer








    New contributor




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










    It sounds so obvious, and yet chances are you haven’t done this.



    By default Ubuntu keeps every update it downloads and installs in a cache on your disk, just in case you ever need it again.



    This is useful if you regularly add and remove apps, find yourself needing to reconfigure/reinstall a specific package, or simply have a poor connection.



    But the flip side is that the apt package cache can quickly swell to several hundred MBs. This command tells you how big your apt cache is:



    du -sh /var/cache/apt/archives



    To clean the apt cache on Ubuntu simply run the following command.



    sudo apt-get clean



    The apt clean command removes ALL packages kept in the apt cache, regardless of age or need. If you’re on a slow, capped or intermittent connection you may want to consider skipping this step.



    (https://www.omgubuntu.co.uk/2016/08/5-ways-free-up-space-on-ubuntu)







    share|improve this answer








    New contributor




    Gibran Anderson 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




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









    answered yesterday









    Gibran AndersonGibran Anderson

    11




    11




    New contributor




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





    New contributor





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






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








    • 1





      It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

      – PerlDuck
      yesterday














    • 1





      It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

      – PerlDuck
      yesterday








    1




    1





    It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

    – PerlDuck
    yesterday





    It is all true what you say but the OP wrote "The space is used by /var/cache/polipo (2.7G)"

    – PerlDuck
    yesterday











    -1














    I couldn't find any Ubuntu specific documentation on "/var/cache" although only spent a couple of minutes on it. Based on its name and the answers to a related question, I'm comfortable manually deleting files from there.



    First, I had a look at the worst offending applications (directories):



    sudo du -hs /var/cache/* | sort -h


    And I saw that they were clearly these two:



    1.1G    /var/cache/mock
    1.5G /var/cache/lxc


    I don't plan to use mock or lxc in the next few weeks, so I went ahead and did:



    sudo rm -rf /var/cache/mock/*
    sudo rm -rf /var/cache/lxc


    And all is good.






    share|improve this answer




























      -1














      I couldn't find any Ubuntu specific documentation on "/var/cache" although only spent a couple of minutes on it. Based on its name and the answers to a related question, I'm comfortable manually deleting files from there.



      First, I had a look at the worst offending applications (directories):



      sudo du -hs /var/cache/* | sort -h


      And I saw that they were clearly these two:



      1.1G    /var/cache/mock
      1.5G /var/cache/lxc


      I don't plan to use mock or lxc in the next few weeks, so I went ahead and did:



      sudo rm -rf /var/cache/mock/*
      sudo rm -rf /var/cache/lxc


      And all is good.






      share|improve this answer


























        -1












        -1








        -1







        I couldn't find any Ubuntu specific documentation on "/var/cache" although only spent a couple of minutes on it. Based on its name and the answers to a related question, I'm comfortable manually deleting files from there.



        First, I had a look at the worst offending applications (directories):



        sudo du -hs /var/cache/* | sort -h


        And I saw that they were clearly these two:



        1.1G    /var/cache/mock
        1.5G /var/cache/lxc


        I don't plan to use mock or lxc in the next few weeks, so I went ahead and did:



        sudo rm -rf /var/cache/mock/*
        sudo rm -rf /var/cache/lxc


        And all is good.






        share|improve this answer













        I couldn't find any Ubuntu specific documentation on "/var/cache" although only spent a couple of minutes on it. Based on its name and the answers to a related question, I'm comfortable manually deleting files from there.



        First, I had a look at the worst offending applications (directories):



        sudo du -hs /var/cache/* | sort -h


        And I saw that they were clearly these two:



        1.1G    /var/cache/mock
        1.5G /var/cache/lxc


        I don't plan to use mock or lxc in the next few weeks, so I went ahead and did:



        sudo rm -rf /var/cache/mock/*
        sudo rm -rf /var/cache/lxc


        And all is good.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 2 '18 at 9:08









        NagevNagev

        17725




        17725






























            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%2f367617%2fhow-to-clean-var-cache%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

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局