I've got Ubuntu 22.04.5, and my root directory is on a 76GB partition. Normally, it stays around 45GB full, but suddenly it jumped to about 70GB. I'm not exactly sure when this happened or what caused it, since I haven't made any big changes. I could use some help figuring out how to check what's taking up all that space. I ran the `du` command, and here's what I found:
- 3.6T /media
- 661G /home
- 16G /usr
- 12G /var
- 5.5G /snap
- 2.0G /opt
- 564M /boot
- 63M /tmp
- 17M /etc
- 2.8M /run
- 2.5M /root
- 16K /lost+found
- 4.0K /srv
- 4.0K /mnt
- 4.0K /cdrom
- 0 /sys
- 0 /sbin
- 0 /proc
- 0 /libx32
- 0 /lib64
- 0 /lib32
- 0 /lib
- 0 /dev
- 0 /bin
I'd really appreciate any step-by-step guidance you could give me! Thanks a lot!
3 Answers
Try installing `ncdu`—it's a handy tool for checking disk usage. Just run `sudo apt install ncdu`, then launch it with `sudo ncdu -x /`. It’s user-friendly and allows you to navigate using arrow keys to see what's taking up space on your system. Good luck!
Based on what you shared, both `/var` and `/usr` got pretty large. After using `autoremove`, if you still find space is tight, check inside `/usr`—you might find large files in `/usr/lib` or other subdirectories. Sometimes applications can leave behind a lot of files after updates!
I checked `/usr`, and it's also taking up a good chunk. Looks like `/lib` is the biggest culprit there. Thanks for the heads up!
It looks like your `/var` directory might be hogging space, possibly due to logs or cache. You can check the size of different folders inside `/var` to see what's bloating it. Also, running `sudo apt autoremove` can clean up old kernels and modules—this might help free up some space!
I ran `autoremove`, and it cleared out about 1GB! I’ll take a closer look at `/var` next.
Thanks for the tip! I’ll check out how to use `ncdu`. I need something easy to navigate.