Used disk space higher than what it should be

Hi everyone, first time poster, been using Manjaro for 8 months now. I’m making this thread because I can’t figure this one out on my own.

The Issue

  • 125GiB partition - 104GiB used - 21GiB available
  • I shouldn’t be using this much disk space. I’m unable to figure out what is causing this.
  • QDirStat / FileLight only able to find 50GiB of it.

Below a list of commands I found on other topics diagnosing disk usage related issues, hopefully these give you guys enough information.

lsblk -o NAME,FSTYPE,SIZE,FSUSED,FSAVAIL,FSUSE%,MOUNTPOINTS --exclude 8
NAME        FSTYPE   SIZE FSUSED FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1            465,8G                       
├─nvme0n1p1           16M                       
├─nvme0n1p2 vfat     512M   712K  510,3M     0% /boot/efi
├─nvme0n1p3 swap       8G                       [SWAP]
└─nvme0n1p4 btrfs    125G 103,4G   20,4G    83% /run/timeshift/backup
                                                /var/lib/docker/btrfs
                                                /home
                                                /
df -h
df: /run/user/1000/doc: Operation not permitted
Filesystem      Size  Used Avail Use% Mounted on
dev             7,8G   44K  7,8G   1% /dev
run             7,8G  2,8M  7,8G   1% /run
/dev/nvme0n1p4  125G  104G   21G  84% /
tmpfs           7,8G  4,0K  7,8G   1% /dev/shm
tmpfs           7,8G   51M  7,8G   1% /tmp
/dev/nvme0n1p4  125G  104G   21G  84% /home
/dev/sdc2       3,7T  3,4T  320G  92% /disk/4
/dev/sda1       7,3T  6,7T  686G  91% /disk/8
/dev/nvme0n1p2  511M  712K  511M   1% /boot/efi
/dev/sdd1        11T  2,7T  8,3T  25% /disk/12
tmpfs           1,6G   92K  1,6G   1% /run/user/1000
/dev/sdb4       209G  183G   26G  88% /run/media/fw/4A2E84702E84573B
/dev/nvme0n1p4  125G  104G   21G  84% /run/timeshift/backup

sudo du -ha -d1 --exclude "/proc" --exclude "/sys" / | sort -hr | head -30
du: cannot access '/run/user/1000/doc': Permission denied
du: cannot access '/run/user/1000/gvfs': Permission denied
14T     /
13T     /disk
598G    /run
34G     /var
21G     /home
20G     /usr
441M    /opt
101M    /boot
51M     /tmp
17M     /root
14M     /etc
168K    /file
48K     /dev
24K     /desktopfs-pkgs.txt
8,0K    /rootfs-pkgs.txt
4,0K    /sbin
4,0K    /.manjaro-tools
4,0K    /lib64
4,0K    /lib
4,0K    /bin
0       /srv
0       /mnt

QDirStat: 50GiB

Thanks in advance.

https://wiki.manjaro.org/index.php/System_Maintenance

1 Like

There’s a better one sudo du -axhd1 / | sort -h, will actually exclude more un-neccesary stuff than you did. Should be much quicker too. :slight_smile:

Haven’t tried it on btrfs though.

-x will stop it from crossing filesystem boundaries, so it will only do /, no data or temporary filesystems like /disk, /sys, /proc, /dev etc.

You might wanna check under mounts too, if there are files in your mountpoint then you won’t see them whilst something is mounted over them.

2 Likes

Are you running large docker images that are being backed up?

2 Likes

Thanks, I have been using the Arch System maintenance wiki. Journals, .cache, pacman/pamac/paccache were cleaned just last week, and yesterday while I was trying to deal with this problem.

I have about 4GiB worth of docker images and now that you mention it, I think Timeshift is what’s taking up so much space.
It seems that I’m not able to exclude any directories from Timeshift’s Btrfs snapshots, other than /home.

Ok I think this one can be solved. Timeshift’s snapshots were taking up a lot of space. The main reason why I couldn’t figure this one out was mainly my lack of understanding how Timeshift Btrfs snapshots work.

Thanks everyone for replying, you guys were asking the right questions :slight_smile:

2 Likes

This was the better command indeed :stuck_out_tongue: , as the info on all temp disks wasn’t important in this case. And it was much quicker.

sudo du -axhd1 / | sort -hr
31G     /
20G     /usr
11G     /var
441M    /opt
100M    /boot
17M     /root
14M     /etc
168K    /file
24K     /desktopfs-pkgs.txt
8,0K    /rootfs-pkgs.txt
4,0K    /sbin
4,0K    /.manjaro-tools
4,0K    /lib64
4,0K    /lib
4,0K    /bin
0       /srv
0       /mnt
0       /disk
2 Likes

You did see that QDirStat told you that you couldn’t access some of those directories due to insufficient directories, right? What’s hiding in any of these is anybody’s guess.

Whenever it says >xy GB (and it’s yellow or red in your dark widget theme), there is MORE than those xy GB in that subtree.

To get full access, start it with root permissions:

xhost +
sudo qdirstat /
1 Like

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