Root partition is almost full

Hi there, I write this because recently noticed my / root folder is almost full, I already followed another tutorials but none of them worked for me. Just to be more clear I already read these related posts:

  1. Root partition nearly full → doesn’t work casue my partition is not btrfs
  2. Lost space on root partition → there is not clear solution

In summary a whole 256gb ssd for my entire system, I have two different partitions for / and /home, specifically I have 64gb for the first and 150gb for the second one as you can see with the logs below:
Running

df -Th    

I got

Filesystem     Type      Size  Used Avail Use% Mounted on
dev            devtmpfs  7,8G     0  7,8G   0% /dev
run            tmpfs     7,8G  2,5M  7,8G   1% /run
efivarfs       efivarfs  184K  133K   47K  74% /sys/firmware/efi/efivars
/dev/nvme0n1p3 ext4       63G   50G  9,6G  84% /
tmpfs          tmpfs     7,8G     0  7,8G   0% /dev/shm
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-udev-load-credentials.service
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-tmpfiles-setup-dev-early.service
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-sysctl.service
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-tmpfiles-setup-dev.service
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-journald.service
/dev/loop0     squashfs  128K  128K     0 100% /var/lib/snapd/snap/bare/5
/dev/loop4     squashfs   64M   64M     0 100% /var/lib/snapd/snap/core20/2434
/dev/loop1     squashfs   56M   56M     0 100% /var/lib/snapd/snap/core18/2829
/dev/loop5     squashfs   74M   74M     0 100% /var/lib/snapd/snap/core22/1663
/dev/loop2     squashfs   56M   56M     0 100% /var/lib/snapd/snap/core18/2846
/dev/loop3     squashfs   64M   64M     0 100% /var/lib/snapd/snap/core20/2379
/dev/loop6     squashfs   74M   74M     0 100% /var/lib/snapd/snap/core22/1722
/dev/loop7     squashfs  219M  219M     0 100% /var/lib/snapd/snap/gnome-3-34-1804/93
/dev/loop9     squashfs   92M   92M     0 100% /var/lib/snapd/snap/gtk-common-themes/1535
/dev/loop8     squashfs  506M  506M     0 100% /var/lib/snapd/snap/gnome-42-2204/176
/dev/loop10    squashfs  174M  174M     0 100% /var/lib/snapd/snap/postman/248
/dev/loop11    squashfs  174M  174M     0 100% /var/lib/snapd/snap/postman/254
/dev/loop12    squashfs  122M  122M     0 100% /var/lib/snapd/snap/slack/176
/dev/loop13    squashfs  122M  122M     0 100% /var/lib/snapd/snap/slack/178
/dev/loop14    squashfs   39M   39M     0 100% /var/lib/snapd/snap/snapd/21759
/dev/loop15    squashfs   45M   45M     0 100% /var/lib/snapd/snap/snapd/23258
tmpfs          tmpfs     7,8G     0  7,8G   0% /tmp
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-vconsole-setup.service
/dev/nvme0n1p4 ext4      154G  109G   38G  75% /home
/dev/nvme0n1p1 vfat     1023M  420K 1023M   1% /boot/efi
tmpfs          tmpfs     1,0M     0  1,0M   0% /run/credentials/systemd-tmpfiles-setup.service
tmpfs          tmpfs     1,6G  176K  1,6G   1% /run/user/1000

So I already used 50gb of 65gb of the / partition. Now, running this

ncdu -x /    

I got this output:

.  14.2 GiB             [##############] /usr                                                           
.   4.6 GiB S 859.5 MiB [####          ] /var
. 832.7 MiB             [              ] /opt
  130.6 MiB             [              ] /boot
.  14.8 MiB             [              ] /etc
   24.0 KiB             [              ]  desktopfs-pkgs.txt
!  16.0 KiB             [              ] /lost+found
   12.0 KiB             [              ] /srv
    8.0 KiB             [              ]  rootfs-pkgs.txt
!   4.0 KiB             [              ] /root
!   4.0 KiB             [              ] /postgres-data
e   4.0 KiB             [              ] /mnt
    4.0 KiB             [              ]  .manjaro-tools
@   0.0   B             [              ]  snap
@   0.0   B             [              ]  sbin
@   0.0   B             [              ]  lib64
@   0.0   B             [              ]  lib
@   0.0   B             [              ]  bin
>   0.0   B             [              ] /tmp
>   0.0   B             [              ] /sys
>   0.0   B             [              ] /run
>   0.0   B             [              ] /proc
>   0.0   B             [              ] /home
>   0.0   B             [              ] /dev

And it is quite weird since if you sum up all weights they aren’t more than 22gb, so my questions are:

  • How can I free up space into my root folder? I just want be sure I only delete older and useless data like logs, older version for some libraries or not used libraries
  • How can I see how the structure of / actually is? I mean the whole data, where did the remaining 28gb go? Why I can’t see the whole used 50gb but only 22gb are summarized?

Finally I’ve had this issue before so I coded a simple script to cleaning up snap/flatpak cache and other useless files on my pc so, just to keep in mind I already checked with all this commands:


  sudo paccache -rvk0 
  sudo paccache -rvuk0
  sudo paccache -rvk3
  sudo pacman -Sc    					
  sudo pacman -Scc   					
  sudo pacman -Qdt            
  sudo pacman -Rns $(pacman -Qtdq) 
  flatpak uninstall --unused  
  journalctl --disk-usage			
  sudo journalctl --vacuum-size=500M	
  sudo journalctl --vacuum-time=14d		

Thank you so much for all your help and your time!

1 Like

Load up a live USB and mount /. Check if there are any files in your mount points.

1 Like

Gnome has a graphical disk usage analyzer (baobab), this might be easier to interpret then an ncursus interface.

From one of the links in the op, snaps could be the cause of wrong disk usage reports it is suggested. I do not use snaps so cannot give advice, might worth looking into this.

1 Like

… just the relatively obvious:

could not read/look into:
lost+found, root, postgres-data

the ! in front of these lines

3 Likes

Get rid of the Snaps and install their counterparts from the repositories. Snaps use up a lot of disk space.

6 Likes

This is a hint to buy a bigger SSD

(or clean up from time to time before this happens) :footprints:

3 Likes

Execute the command with sudo to see all folders:

sudo ncdu -x /

Other than that, your values are quite similar to mines.

2 Likes

PS…

These and more are included in maclean

2 Likes

@cfinnberg tysm, I put sudo at the beginning of the command and I could see all the information about my disk, finally my problem was more related to volumes linked to some Docker containers than to other things. Just out of curiosity, here is the new output in /var folder (the heaviest one)

--- /var/lib/docker ------------------------------------------------------------------------------------
                             /..                                                                        
    9.5 GiB [##############] /volumes
    9.1 GiB [############# ] /overlay2
   47.0 MiB [              ] /buildkit
   26.6 MiB [              ] /image
  456.0 KiB [              ] /containers
  108.0 KiB [              ] /network
   16.0 KiB [              ] /plugins
e   4.0 KiB [              ] /tmp
e   4.0 KiB [              ] /swarm
e   4.0 KiB [              ] /runtimes
    4.0 KiB [              ]  engine-id

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.