What do I do when my root filesystem is full?












25















My / folder is reading as full and I can't update software or do anything.



Not sure what I'm doing wrong here.



$ df -h
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 770M 1.1M 769M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 808K 1.9G 1% /run/shm
/dev/sda6 961M 18M 895M 2% /tmp
/dev/sda7 9.9G 2.9G 6.6G 31% /home
/dev/sda3 5.7G 140M 5.3G 3% /usr/local
/dev/sda4 2.9G 1.3G 1.4G 49% /var
/dev/sdb1 94G 1.3G 88G 2% /sites
/home/username/.Private 9.9G 2.9G 6.6G 31% /home/username
/dev/sdb5 282G 88G 180G 33% /mnt/multimedia


$ df -h /
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /

$ du /mnt /media
Results:
4 /mnt/multimedia
8 /mnt
4 /media


This is a new install of Ubuntu 12.04 and I'm not sure how/why the root system is so full.










share|improve this question

























  • huh. I guess it is full, somehow. I adjusted the questions with zwets suggested outputs

    – Jesse
    Mar 12 '13 at 7:10











  • For me it was filled up by outdated kernels and I cleaned them up with this dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge Got it from Ubuntu Community Help

    – RajaRaviVarma
    Apr 12 '15 at 15:56


















25















My / folder is reading as full and I can't update software or do anything.



Not sure what I'm doing wrong here.



$ df -h
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 770M 1.1M 769M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 808K 1.9G 1% /run/shm
/dev/sda6 961M 18M 895M 2% /tmp
/dev/sda7 9.9G 2.9G 6.6G 31% /home
/dev/sda3 5.7G 140M 5.3G 3% /usr/local
/dev/sda4 2.9G 1.3G 1.4G 49% /var
/dev/sdb1 94G 1.3G 88G 2% /sites
/home/username/.Private 9.9G 2.9G 6.6G 31% /home/username
/dev/sdb5 282G 88G 180G 33% /mnt/multimedia


$ df -h /
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /

$ du /mnt /media
Results:
4 /mnt/multimedia
8 /mnt
4 /media


This is a new install of Ubuntu 12.04 and I'm not sure how/why the root system is so full.










share|improve this question

























  • huh. I guess it is full, somehow. I adjusted the questions with zwets suggested outputs

    – Jesse
    Mar 12 '13 at 7:10











  • For me it was filled up by outdated kernels and I cleaned them up with this dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge Got it from Ubuntu Community Help

    – RajaRaviVarma
    Apr 12 '15 at 15:56
















25












25








25


18






My / folder is reading as full and I can't update software or do anything.



Not sure what I'm doing wrong here.



$ df -h
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 770M 1.1M 769M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 808K 1.9G 1% /run/shm
/dev/sda6 961M 18M 895M 2% /tmp
/dev/sda7 9.9G 2.9G 6.6G 31% /home
/dev/sda3 5.7G 140M 5.3G 3% /usr/local
/dev/sda4 2.9G 1.3G 1.4G 49% /var
/dev/sdb1 94G 1.3G 88G 2% /sites
/home/username/.Private 9.9G 2.9G 6.6G 31% /home/username
/dev/sdb5 282G 88G 180G 33% /mnt/multimedia


$ df -h /
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /

$ du /mnt /media
Results:
4 /mnt/multimedia
8 /mnt
4 /media


This is a new install of Ubuntu 12.04 and I'm not sure how/why the root system is so full.










share|improve this question
















My / folder is reading as full and I can't update software or do anything.



Not sure what I'm doing wrong here.



$ df -h
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 770M 1.1M 769M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 808K 1.9G 1% /run/shm
/dev/sda6 961M 18M 895M 2% /tmp
/dev/sda7 9.9G 2.9G 6.6G 31% /home
/dev/sda3 5.7G 140M 5.3G 3% /usr/local
/dev/sda4 2.9G 1.3G 1.4G 49% /var
/dev/sdb1 94G 1.3G 88G 2% /sites
/home/username/.Private 9.9G 2.9G 6.6G 31% /home/username
/dev/sdb5 282G 88G 180G 33% /mnt/multimedia


$ df -h /
Results:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.7G 5.4G 0 100% /

$ du /mnt /media
Results:
4 /mnt/multimedia
8 /mnt
4 /media


This is a new install of Ubuntu 12.04 and I'm not sure how/why the root system is so full.







mount filesystem disk-usage mountpoint






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 12 '13 at 9:53









H.-Dirk Schmitt

3,9361822




3,9361822










asked Mar 12 '13 at 6:32









JesseJesse

130125




130125













  • huh. I guess it is full, somehow. I adjusted the questions with zwets suggested outputs

    – Jesse
    Mar 12 '13 at 7:10











  • For me it was filled up by outdated kernels and I cleaned them up with this dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge Got it from Ubuntu Community Help

    – RajaRaviVarma
    Apr 12 '15 at 15:56





















  • huh. I guess it is full, somehow. I adjusted the questions with zwets suggested outputs

    – Jesse
    Mar 12 '13 at 7:10











  • For me it was filled up by outdated kernels and I cleaned them up with this dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge Got it from Ubuntu Community Help

    – RajaRaviVarma
    Apr 12 '15 at 15:56



















huh. I guess it is full, somehow. I adjusted the questions with zwets suggested outputs

– Jesse
Mar 12 '13 at 7:10





huh. I guess it is full, somehow. I adjusted the questions with zwets suggested outputs

– Jesse
Mar 12 '13 at 7:10













For me it was filled up by outdated kernels and I cleaned them up with this dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge Got it from Ubuntu Community Help

– RajaRaviVarma
Apr 12 '15 at 15:56







For me it was filled up by outdated kernels and I cleaned them up with this dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]+)/1/")"'/d;s/^[^ ]* [^ ]* ([^ ]*).*/1/;/[0-9]/!d' | xargs sudo apt-get -y purge Got it from Ubuntu Community Help

– RajaRaviVarma
Apr 12 '15 at 15:56












5 Answers
5






active

oldest

votes


















23














Some likely measures for an overflowing root partition are (based on cases):



1. Core dumps filling up the disk.



Check with:



find / -xdev -name core -ls -o  -path "/lib*" -prune


2. Unnecessary packages filling up the space.



The following command will remove all automatically installed packages, which aren't required any more. (Because the dependency which force the installation in the past has been removed.)



apt-get autoremove --purge 


3. Outdated kernel packages



Check how many kernel packages are installed, and remove outdated kernel versions. You may investigate the current situation with:



dpkg -l "linux*{tools}*" |grep ^.i


Remove any kernel versions you doesn't need any more



4. Hidden storage



Other mounted partitions may hide used storage. To investigate this mount the root file system temporary on a second location:



mkdir /tmp/2ndRoot
mount /dev/sda1 /tmp/2ndRoot


Now look on every directory, that is normally hidden by another mount, e.g.:




  • tmp

  • home

  • run

  • var


  • usr/local



    and in your case also:



  • sites


Caveat



Don`t forget to control at the end the consistency of your installation with:



apt-get install -f


Notes



Reserved storage



/dev/sda1       5.7G  5.4G     0 100% /


The output shows that you have still some space, but it seems to be reserved for root.
The good point is that your system functionality is currently still be given.



But you should fix the problem soon.



Space consumption of ubuntu 12.04



To have only 5.7 Gb for an ubuntu installation seems to be a bit too little.
You should remove some unessential software packages.



My current installations have 10-14 Gb for the root and binary (aka /usr) partitions.






share|improve this answer


























  • Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

    – Jesse
    Mar 12 '13 at 20:42





















23














Just to share a magic command to know where all your disk space goes:



sudo du -hsx /* | sort -rh | head -n 40


You end up with a pretty neat report like this:



16G     /home
5.3G /var
2.6G /usr
840M /run
277M /root
171M /lib
59M /tmp
25M /sbin
19M /boot
16M /bin
9.6M /etc
136K /ngx_pagespeed-latest-stable.zip
24K /DEBIAN
16K /lost+found
8.0K /media
4.0K /srv
4.0K /opt
4.0K /mnt
4.0K /lib64


Then you can start again from another folder:



sudo du -hsx /home/* | sort -rh | head -n 35


Remove what's not necessary and you should be fine. It's part of my linux cheat sheet






share|improve this answer


























  • Nice post and useful tool to have...

    – George Udosen
    Feb 20 '17 at 5:52






  • 3





    What about the hidden folders though? The ones that begin with a dot.

    – John Red
    Dec 20 '17 at 8:58



















3














Another solution would be to use ncdu, eg:



sudo ncdu -x /


Where / is the partition/drive you wanna check.
For my example, the result is



    4,0GiB [##########] /usr
579,3MiB [# ] /root
487,4MiB [# ] /opt
41,7MiB [ ] /lib
22,7MiB [ ] /sbin
21,2MiB [ ] /boot
18,6MiB [ ] /etc
9,1MiB [ ] /bin
3,6MiB [ ] core
260,0KiB [ ] /build
88,0KiB [ ] /tmp
e 16,0KiB [ ] /lost+found
8,0KiB [ ] /media
4,0KiB [ ] /lib64
e 4,0KiB [ ] /srv
e 4,0KiB [ ] /mnt
> 0,0 B [ ] /var
> 0,0 B [ ] /sys
> 0,0 B [ ] /run
> 0,0 B [ ] /proc
> 0,0 B [ ] /ovhbackup
> 0,0 B [ ] /home
> 0,0 B [ ] /dev


Then you can navigate through the folders using your keyboard arrows and simply press the D key to delete a folder/file.



ncdu can be installed from the apt packaging tool on Debian based systems:



sudo apt install ncdu





share|improve this answer































    0














    Check the "/home/yourname/.local/share/Trash" folder with "du" command (see above):



    I was having this same problem and used the trick mickael posted above to concisely print out disk usage. I found that if you delete things using the window manager and you don't have sufficient permissions at the time you do it, the files you thought you deleted (both by command line using "rm" and "apt autoremove --purge", and by emptying trash bin) may have ended up in the ".local/share/____" of the root partition.



    "Filesystem" in the left pane of the window manager was saying nearly full of the 50gb I set aside for installation files for Ubuntu/Mint. Turns out the lectures I mistakenly copied to this partition weren't deleted when I moved them to the partition I originally meant to copy them to. It is now 36gb free which makes way more sense (mine is large mainly because I keep HD graphics on this partition too for quick previewing of large sets of images).



    Definitely make sure you get a good understanding of permissions before you delete / manage your files or may wind up having things you thought were deleted crowding your SSD.



    As a side note, my 16gb of ram was loading on boot at 92% while my root partition was housing said deleted files, and staying there steadily because of this same issue too. The ram is used to cache items on the disk to vastly improve linux's performance. The operating system will assume you're using the installation partition correctly (which was not the case for me in this instance) so it will cache what it can to accelerate system responsiveness. Now this is only a point of note, since disk caching doesn't reserve that space in memory; it would yield the used ram space to other programs that need it when they request it (that's just how disk caching works), but it's a needless use of resources loading 14.5gb of deleted files into ram every time I booted.



    Hope it helps! Huge thank you to the answers above, extremely helpful!






    share|improve this answer































      0














      Lubuntu users ?



      /home/XXX/.cache/lxsession/run.log


      was over 85G of space, they even know about it!






      share|improve this answer
























      • My file was .cache/lxsession/Lubuntu/run.log

        – Stephane
        Feb 21 at 7:02











      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%2f266825%2fwhat-do-i-do-when-my-root-filesystem-is-full%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      23














      Some likely measures for an overflowing root partition are (based on cases):



      1. Core dumps filling up the disk.



      Check with:



      find / -xdev -name core -ls -o  -path "/lib*" -prune


      2. Unnecessary packages filling up the space.



      The following command will remove all automatically installed packages, which aren't required any more. (Because the dependency which force the installation in the past has been removed.)



      apt-get autoremove --purge 


      3. Outdated kernel packages



      Check how many kernel packages are installed, and remove outdated kernel versions. You may investigate the current situation with:



      dpkg -l "linux*{tools}*" |grep ^.i


      Remove any kernel versions you doesn't need any more



      4. Hidden storage



      Other mounted partitions may hide used storage. To investigate this mount the root file system temporary on a second location:



      mkdir /tmp/2ndRoot
      mount /dev/sda1 /tmp/2ndRoot


      Now look on every directory, that is normally hidden by another mount, e.g.:




      • tmp

      • home

      • run

      • var


      • usr/local



        and in your case also:



      • sites


      Caveat



      Don`t forget to control at the end the consistency of your installation with:



      apt-get install -f


      Notes



      Reserved storage



      /dev/sda1       5.7G  5.4G     0 100% /


      The output shows that you have still some space, but it seems to be reserved for root.
      The good point is that your system functionality is currently still be given.



      But you should fix the problem soon.



      Space consumption of ubuntu 12.04



      To have only 5.7 Gb for an ubuntu installation seems to be a bit too little.
      You should remove some unessential software packages.



      My current installations have 10-14 Gb for the root and binary (aka /usr) partitions.






      share|improve this answer


























      • Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

        – Jesse
        Mar 12 '13 at 20:42


















      23














      Some likely measures for an overflowing root partition are (based on cases):



      1. Core dumps filling up the disk.



      Check with:



      find / -xdev -name core -ls -o  -path "/lib*" -prune


      2. Unnecessary packages filling up the space.



      The following command will remove all automatically installed packages, which aren't required any more. (Because the dependency which force the installation in the past has been removed.)



      apt-get autoremove --purge 


      3. Outdated kernel packages



      Check how many kernel packages are installed, and remove outdated kernel versions. You may investigate the current situation with:



      dpkg -l "linux*{tools}*" |grep ^.i


      Remove any kernel versions you doesn't need any more



      4. Hidden storage



      Other mounted partitions may hide used storage. To investigate this mount the root file system temporary on a second location:



      mkdir /tmp/2ndRoot
      mount /dev/sda1 /tmp/2ndRoot


      Now look on every directory, that is normally hidden by another mount, e.g.:




      • tmp

      • home

      • run

      • var


      • usr/local



        and in your case also:



      • sites


      Caveat



      Don`t forget to control at the end the consistency of your installation with:



      apt-get install -f


      Notes



      Reserved storage



      /dev/sda1       5.7G  5.4G     0 100% /


      The output shows that you have still some space, but it seems to be reserved for root.
      The good point is that your system functionality is currently still be given.



      But you should fix the problem soon.



      Space consumption of ubuntu 12.04



      To have only 5.7 Gb for an ubuntu installation seems to be a bit too little.
      You should remove some unessential software packages.



      My current installations have 10-14 Gb for the root and binary (aka /usr) partitions.






      share|improve this answer


























      • Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

        – Jesse
        Mar 12 '13 at 20:42
















      23












      23








      23







      Some likely measures for an overflowing root partition are (based on cases):



      1. Core dumps filling up the disk.



      Check with:



      find / -xdev -name core -ls -o  -path "/lib*" -prune


      2. Unnecessary packages filling up the space.



      The following command will remove all automatically installed packages, which aren't required any more. (Because the dependency which force the installation in the past has been removed.)



      apt-get autoremove --purge 


      3. Outdated kernel packages



      Check how many kernel packages are installed, and remove outdated kernel versions. You may investigate the current situation with:



      dpkg -l "linux*{tools}*" |grep ^.i


      Remove any kernel versions you doesn't need any more



      4. Hidden storage



      Other mounted partitions may hide used storage. To investigate this mount the root file system temporary on a second location:



      mkdir /tmp/2ndRoot
      mount /dev/sda1 /tmp/2ndRoot


      Now look on every directory, that is normally hidden by another mount, e.g.:




      • tmp

      • home

      • run

      • var


      • usr/local



        and in your case also:



      • sites


      Caveat



      Don`t forget to control at the end the consistency of your installation with:



      apt-get install -f


      Notes



      Reserved storage



      /dev/sda1       5.7G  5.4G     0 100% /


      The output shows that you have still some space, but it seems to be reserved for root.
      The good point is that your system functionality is currently still be given.



      But you should fix the problem soon.



      Space consumption of ubuntu 12.04



      To have only 5.7 Gb for an ubuntu installation seems to be a bit too little.
      You should remove some unessential software packages.



      My current installations have 10-14 Gb for the root and binary (aka /usr) partitions.






      share|improve this answer















      Some likely measures for an overflowing root partition are (based on cases):



      1. Core dumps filling up the disk.



      Check with:



      find / -xdev -name core -ls -o  -path "/lib*" -prune


      2. Unnecessary packages filling up the space.



      The following command will remove all automatically installed packages, which aren't required any more. (Because the dependency which force the installation in the past has been removed.)



      apt-get autoremove --purge 


      3. Outdated kernel packages



      Check how many kernel packages are installed, and remove outdated kernel versions. You may investigate the current situation with:



      dpkg -l "linux*{tools}*" |grep ^.i


      Remove any kernel versions you doesn't need any more



      4. Hidden storage



      Other mounted partitions may hide used storage. To investigate this mount the root file system temporary on a second location:



      mkdir /tmp/2ndRoot
      mount /dev/sda1 /tmp/2ndRoot


      Now look on every directory, that is normally hidden by another mount, e.g.:




      • tmp

      • home

      • run

      • var


      • usr/local



        and in your case also:



      • sites


      Caveat



      Don`t forget to control at the end the consistency of your installation with:



      apt-get install -f


      Notes



      Reserved storage



      /dev/sda1       5.7G  5.4G     0 100% /


      The output shows that you have still some space, but it seems to be reserved for root.
      The good point is that your system functionality is currently still be given.



      But you should fix the problem soon.



      Space consumption of ubuntu 12.04



      To have only 5.7 Gb for an ubuntu installation seems to be a bit too little.
      You should remove some unessential software packages.



      My current installations have 10-14 Gb for the root and binary (aka /usr) partitions.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited May 11 '17 at 2:06









      muru

      1




      1










      answered Mar 12 '13 at 7:12









      H.-Dirk SchmittH.-Dirk Schmitt

      3,9361822




      3,9361822













      • Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

        – Jesse
        Mar 12 '13 at 20:42





















      • Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

        – Jesse
        Mar 12 '13 at 20:42



















      Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

      – Jesse
      Mar 12 '13 at 20:42







      Thanks I ended up just bumping up the root partition and I'll keep an eye on it should I have to work in your trick to view all the folders (maybe local/bin?). Odd that the disk space analyzer tool led me to believe it was the mounted drives at /media/ since they were all red and full.

      – Jesse
      Mar 12 '13 at 20:42















      23














      Just to share a magic command to know where all your disk space goes:



      sudo du -hsx /* | sort -rh | head -n 40


      You end up with a pretty neat report like this:



      16G     /home
      5.3G /var
      2.6G /usr
      840M /run
      277M /root
      171M /lib
      59M /tmp
      25M /sbin
      19M /boot
      16M /bin
      9.6M /etc
      136K /ngx_pagespeed-latest-stable.zip
      24K /DEBIAN
      16K /lost+found
      8.0K /media
      4.0K /srv
      4.0K /opt
      4.0K /mnt
      4.0K /lib64


      Then you can start again from another folder:



      sudo du -hsx /home/* | sort -rh | head -n 35


      Remove what's not necessary and you should be fine. It's part of my linux cheat sheet






      share|improve this answer


























      • Nice post and useful tool to have...

        – George Udosen
        Feb 20 '17 at 5:52






      • 3





        What about the hidden folders though? The ones that begin with a dot.

        – John Red
        Dec 20 '17 at 8:58
















      23














      Just to share a magic command to know where all your disk space goes:



      sudo du -hsx /* | sort -rh | head -n 40


      You end up with a pretty neat report like this:



      16G     /home
      5.3G /var
      2.6G /usr
      840M /run
      277M /root
      171M /lib
      59M /tmp
      25M /sbin
      19M /boot
      16M /bin
      9.6M /etc
      136K /ngx_pagespeed-latest-stable.zip
      24K /DEBIAN
      16K /lost+found
      8.0K /media
      4.0K /srv
      4.0K /opt
      4.0K /mnt
      4.0K /lib64


      Then you can start again from another folder:



      sudo du -hsx /home/* | sort -rh | head -n 35


      Remove what's not necessary and you should be fine. It's part of my linux cheat sheet






      share|improve this answer


























      • Nice post and useful tool to have...

        – George Udosen
        Feb 20 '17 at 5:52






      • 3





        What about the hidden folders though? The ones that begin with a dot.

        – John Red
        Dec 20 '17 at 8:58














      23












      23








      23







      Just to share a magic command to know where all your disk space goes:



      sudo du -hsx /* | sort -rh | head -n 40


      You end up with a pretty neat report like this:



      16G     /home
      5.3G /var
      2.6G /usr
      840M /run
      277M /root
      171M /lib
      59M /tmp
      25M /sbin
      19M /boot
      16M /bin
      9.6M /etc
      136K /ngx_pagespeed-latest-stable.zip
      24K /DEBIAN
      16K /lost+found
      8.0K /media
      4.0K /srv
      4.0K /opt
      4.0K /mnt
      4.0K /lib64


      Then you can start again from another folder:



      sudo du -hsx /home/* | sort -rh | head -n 35


      Remove what's not necessary and you should be fine. It's part of my linux cheat sheet






      share|improve this answer















      Just to share a magic command to know where all your disk space goes:



      sudo du -hsx /* | sort -rh | head -n 40


      You end up with a pretty neat report like this:



      16G     /home
      5.3G /var
      2.6G /usr
      840M /run
      277M /root
      171M /lib
      59M /tmp
      25M /sbin
      19M /boot
      16M /bin
      9.6M /etc
      136K /ngx_pagespeed-latest-stable.zip
      24K /DEBIAN
      16K /lost+found
      8.0K /media
      4.0K /srv
      4.0K /opt
      4.0K /mnt
      4.0K /lib64


      Then you can start again from another folder:



      sudo du -hsx /home/* | sort -rh | head -n 35


      Remove what's not necessary and you should be fine. It's part of my linux cheat sheet







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Feb 20 '17 at 3:25









      muru

      1




      1










      answered Feb 20 '17 at 3:22









      mickaelmickael

      23122




      23122













      • Nice post and useful tool to have...

        – George Udosen
        Feb 20 '17 at 5:52






      • 3





        What about the hidden folders though? The ones that begin with a dot.

        – John Red
        Dec 20 '17 at 8:58



















      • Nice post and useful tool to have...

        – George Udosen
        Feb 20 '17 at 5:52






      • 3





        What about the hidden folders though? The ones that begin with a dot.

        – John Red
        Dec 20 '17 at 8:58

















      Nice post and useful tool to have...

      – George Udosen
      Feb 20 '17 at 5:52





      Nice post and useful tool to have...

      – George Udosen
      Feb 20 '17 at 5:52




      3




      3





      What about the hidden folders though? The ones that begin with a dot.

      – John Red
      Dec 20 '17 at 8:58





      What about the hidden folders though? The ones that begin with a dot.

      – John Red
      Dec 20 '17 at 8:58











      3














      Another solution would be to use ncdu, eg:



      sudo ncdu -x /


      Where / is the partition/drive you wanna check.
      For my example, the result is



          4,0GiB [##########] /usr
      579,3MiB [# ] /root
      487,4MiB [# ] /opt
      41,7MiB [ ] /lib
      22,7MiB [ ] /sbin
      21,2MiB [ ] /boot
      18,6MiB [ ] /etc
      9,1MiB [ ] /bin
      3,6MiB [ ] core
      260,0KiB [ ] /build
      88,0KiB [ ] /tmp
      e 16,0KiB [ ] /lost+found
      8,0KiB [ ] /media
      4,0KiB [ ] /lib64
      e 4,0KiB [ ] /srv
      e 4,0KiB [ ] /mnt
      > 0,0 B [ ] /var
      > 0,0 B [ ] /sys
      > 0,0 B [ ] /run
      > 0,0 B [ ] /proc
      > 0,0 B [ ] /ovhbackup
      > 0,0 B [ ] /home
      > 0,0 B [ ] /dev


      Then you can navigate through the folders using your keyboard arrows and simply press the D key to delete a folder/file.



      ncdu can be installed from the apt packaging tool on Debian based systems:



      sudo apt install ncdu





      share|improve this answer




























        3














        Another solution would be to use ncdu, eg:



        sudo ncdu -x /


        Where / is the partition/drive you wanna check.
        For my example, the result is



            4,0GiB [##########] /usr
        579,3MiB [# ] /root
        487,4MiB [# ] /opt
        41,7MiB [ ] /lib
        22,7MiB [ ] /sbin
        21,2MiB [ ] /boot
        18,6MiB [ ] /etc
        9,1MiB [ ] /bin
        3,6MiB [ ] core
        260,0KiB [ ] /build
        88,0KiB [ ] /tmp
        e 16,0KiB [ ] /lost+found
        8,0KiB [ ] /media
        4,0KiB [ ] /lib64
        e 4,0KiB [ ] /srv
        e 4,0KiB [ ] /mnt
        > 0,0 B [ ] /var
        > 0,0 B [ ] /sys
        > 0,0 B [ ] /run
        > 0,0 B [ ] /proc
        > 0,0 B [ ] /ovhbackup
        > 0,0 B [ ] /home
        > 0,0 B [ ] /dev


        Then you can navigate through the folders using your keyboard arrows and simply press the D key to delete a folder/file.



        ncdu can be installed from the apt packaging tool on Debian based systems:



        sudo apt install ncdu





        share|improve this answer


























          3












          3








          3







          Another solution would be to use ncdu, eg:



          sudo ncdu -x /


          Where / is the partition/drive you wanna check.
          For my example, the result is



              4,0GiB [##########] /usr
          579,3MiB [# ] /root
          487,4MiB [# ] /opt
          41,7MiB [ ] /lib
          22,7MiB [ ] /sbin
          21,2MiB [ ] /boot
          18,6MiB [ ] /etc
          9,1MiB [ ] /bin
          3,6MiB [ ] core
          260,0KiB [ ] /build
          88,0KiB [ ] /tmp
          e 16,0KiB [ ] /lost+found
          8,0KiB [ ] /media
          4,0KiB [ ] /lib64
          e 4,0KiB [ ] /srv
          e 4,0KiB [ ] /mnt
          > 0,0 B [ ] /var
          > 0,0 B [ ] /sys
          > 0,0 B [ ] /run
          > 0,0 B [ ] /proc
          > 0,0 B [ ] /ovhbackup
          > 0,0 B [ ] /home
          > 0,0 B [ ] /dev


          Then you can navigate through the folders using your keyboard arrows and simply press the D key to delete a folder/file.



          ncdu can be installed from the apt packaging tool on Debian based systems:



          sudo apt install ncdu





          share|improve this answer













          Another solution would be to use ncdu, eg:



          sudo ncdu -x /


          Where / is the partition/drive you wanna check.
          For my example, the result is



              4,0GiB [##########] /usr
          579,3MiB [# ] /root
          487,4MiB [# ] /opt
          41,7MiB [ ] /lib
          22,7MiB [ ] /sbin
          21,2MiB [ ] /boot
          18,6MiB [ ] /etc
          9,1MiB [ ] /bin
          3,6MiB [ ] core
          260,0KiB [ ] /build
          88,0KiB [ ] /tmp
          e 16,0KiB [ ] /lost+found
          8,0KiB [ ] /media
          4,0KiB [ ] /lib64
          e 4,0KiB [ ] /srv
          e 4,0KiB [ ] /mnt
          > 0,0 B [ ] /var
          > 0,0 B [ ] /sys
          > 0,0 B [ ] /run
          > 0,0 B [ ] /proc
          > 0,0 B [ ] /ovhbackup
          > 0,0 B [ ] /home
          > 0,0 B [ ] /dev


          Then you can navigate through the folders using your keyboard arrows and simply press the D key to delete a folder/file.



          ncdu can be installed from the apt packaging tool on Debian based systems:



          sudo apt install ncdu






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 26 '18 at 9:26









          roasted-toastroasted-toast

          18119




          18119























              0














              Check the "/home/yourname/.local/share/Trash" folder with "du" command (see above):



              I was having this same problem and used the trick mickael posted above to concisely print out disk usage. I found that if you delete things using the window manager and you don't have sufficient permissions at the time you do it, the files you thought you deleted (both by command line using "rm" and "apt autoremove --purge", and by emptying trash bin) may have ended up in the ".local/share/____" of the root partition.



              "Filesystem" in the left pane of the window manager was saying nearly full of the 50gb I set aside for installation files for Ubuntu/Mint. Turns out the lectures I mistakenly copied to this partition weren't deleted when I moved them to the partition I originally meant to copy them to. It is now 36gb free which makes way more sense (mine is large mainly because I keep HD graphics on this partition too for quick previewing of large sets of images).



              Definitely make sure you get a good understanding of permissions before you delete / manage your files or may wind up having things you thought were deleted crowding your SSD.



              As a side note, my 16gb of ram was loading on boot at 92% while my root partition was housing said deleted files, and staying there steadily because of this same issue too. The ram is used to cache items on the disk to vastly improve linux's performance. The operating system will assume you're using the installation partition correctly (which was not the case for me in this instance) so it will cache what it can to accelerate system responsiveness. Now this is only a point of note, since disk caching doesn't reserve that space in memory; it would yield the used ram space to other programs that need it when they request it (that's just how disk caching works), but it's a needless use of resources loading 14.5gb of deleted files into ram every time I booted.



              Hope it helps! Huge thank you to the answers above, extremely helpful!






              share|improve this answer




























                0














                Check the "/home/yourname/.local/share/Trash" folder with "du" command (see above):



                I was having this same problem and used the trick mickael posted above to concisely print out disk usage. I found that if you delete things using the window manager and you don't have sufficient permissions at the time you do it, the files you thought you deleted (both by command line using "rm" and "apt autoremove --purge", and by emptying trash bin) may have ended up in the ".local/share/____" of the root partition.



                "Filesystem" in the left pane of the window manager was saying nearly full of the 50gb I set aside for installation files for Ubuntu/Mint. Turns out the lectures I mistakenly copied to this partition weren't deleted when I moved them to the partition I originally meant to copy them to. It is now 36gb free which makes way more sense (mine is large mainly because I keep HD graphics on this partition too for quick previewing of large sets of images).



                Definitely make sure you get a good understanding of permissions before you delete / manage your files or may wind up having things you thought were deleted crowding your SSD.



                As a side note, my 16gb of ram was loading on boot at 92% while my root partition was housing said deleted files, and staying there steadily because of this same issue too. The ram is used to cache items on the disk to vastly improve linux's performance. The operating system will assume you're using the installation partition correctly (which was not the case for me in this instance) so it will cache what it can to accelerate system responsiveness. Now this is only a point of note, since disk caching doesn't reserve that space in memory; it would yield the used ram space to other programs that need it when they request it (that's just how disk caching works), but it's a needless use of resources loading 14.5gb of deleted files into ram every time I booted.



                Hope it helps! Huge thank you to the answers above, extremely helpful!






                share|improve this answer


























                  0












                  0








                  0







                  Check the "/home/yourname/.local/share/Trash" folder with "du" command (see above):



                  I was having this same problem and used the trick mickael posted above to concisely print out disk usage. I found that if you delete things using the window manager and you don't have sufficient permissions at the time you do it, the files you thought you deleted (both by command line using "rm" and "apt autoremove --purge", and by emptying trash bin) may have ended up in the ".local/share/____" of the root partition.



                  "Filesystem" in the left pane of the window manager was saying nearly full of the 50gb I set aside for installation files for Ubuntu/Mint. Turns out the lectures I mistakenly copied to this partition weren't deleted when I moved them to the partition I originally meant to copy them to. It is now 36gb free which makes way more sense (mine is large mainly because I keep HD graphics on this partition too for quick previewing of large sets of images).



                  Definitely make sure you get a good understanding of permissions before you delete / manage your files or may wind up having things you thought were deleted crowding your SSD.



                  As a side note, my 16gb of ram was loading on boot at 92% while my root partition was housing said deleted files, and staying there steadily because of this same issue too. The ram is used to cache items on the disk to vastly improve linux's performance. The operating system will assume you're using the installation partition correctly (which was not the case for me in this instance) so it will cache what it can to accelerate system responsiveness. Now this is only a point of note, since disk caching doesn't reserve that space in memory; it would yield the used ram space to other programs that need it when they request it (that's just how disk caching works), but it's a needless use of resources loading 14.5gb of deleted files into ram every time I booted.



                  Hope it helps! Huge thank you to the answers above, extremely helpful!






                  share|improve this answer













                  Check the "/home/yourname/.local/share/Trash" folder with "du" command (see above):



                  I was having this same problem and used the trick mickael posted above to concisely print out disk usage. I found that if you delete things using the window manager and you don't have sufficient permissions at the time you do it, the files you thought you deleted (both by command line using "rm" and "apt autoremove --purge", and by emptying trash bin) may have ended up in the ".local/share/____" of the root partition.



                  "Filesystem" in the left pane of the window manager was saying nearly full of the 50gb I set aside for installation files for Ubuntu/Mint. Turns out the lectures I mistakenly copied to this partition weren't deleted when I moved them to the partition I originally meant to copy them to. It is now 36gb free which makes way more sense (mine is large mainly because I keep HD graphics on this partition too for quick previewing of large sets of images).



                  Definitely make sure you get a good understanding of permissions before you delete / manage your files or may wind up having things you thought were deleted crowding your SSD.



                  As a side note, my 16gb of ram was loading on boot at 92% while my root partition was housing said deleted files, and staying there steadily because of this same issue too. The ram is used to cache items on the disk to vastly improve linux's performance. The operating system will assume you're using the installation partition correctly (which was not the case for me in this instance) so it will cache what it can to accelerate system responsiveness. Now this is only a point of note, since disk caching doesn't reserve that space in memory; it would yield the used ram space to other programs that need it when they request it (that's just how disk caching works), but it's a needless use of resources loading 14.5gb of deleted files into ram every time I booted.



                  Hope it helps! Huge thank you to the answers above, extremely helpful!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 13 at 17:30









                  Kris DriverKris Driver

                  112




                  112























                      0














                      Lubuntu users ?



                      /home/XXX/.cache/lxsession/run.log


                      was over 85G of space, they even know about it!






                      share|improve this answer
























                      • My file was .cache/lxsession/Lubuntu/run.log

                        – Stephane
                        Feb 21 at 7:02
















                      0














                      Lubuntu users ?



                      /home/XXX/.cache/lxsession/run.log


                      was over 85G of space, they even know about it!






                      share|improve this answer
























                      • My file was .cache/lxsession/Lubuntu/run.log

                        – Stephane
                        Feb 21 at 7:02














                      0












                      0








                      0







                      Lubuntu users ?



                      /home/XXX/.cache/lxsession/run.log


                      was over 85G of space, they even know about it!






                      share|improve this answer













                      Lubuntu users ?



                      /home/XXX/.cache/lxsession/run.log


                      was over 85G of space, they even know about it!







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Feb 17 at 19:03









                      GoufaliteGoufalite

                      1115




                      1115













                      • My file was .cache/lxsession/Lubuntu/run.log

                        – Stephane
                        Feb 21 at 7:02



















                      • My file was .cache/lxsession/Lubuntu/run.log

                        – Stephane
                        Feb 21 at 7:02

















                      My file was .cache/lxsession/Lubuntu/run.log

                      – Stephane
                      Feb 21 at 7:02





                      My file was .cache/lxsession/Lubuntu/run.log

                      – Stephane
                      Feb 21 at 7:02


















                      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%2f266825%2fwhat-do-i-do-when-my-root-filesystem-is-full%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 to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                      is 'sed' thread safe

                      How to make a Squid Proxy server?