I'm using Ubuntu 22.04.5 and I've noticed that my root directory partition, which is usually around 45GB, has ballooned to nearly 70GB. I'm unsure how quickly this happened or what might have caused it, as I didn't notice anything unusual until I received a warning about space. I'm not very experienced with these things, so I'd appreciate step-by-step help in figuring out what's taking up so much space. Here's the output from the `du` command that I ran: 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.
3 Answers
Given that both `/var` and `/usr` are quite large, have you tried running `sudo apt autoremove`? It can clean up old kernel and module files, which might help free up some space.
You should try using `ncdu`, which gives you a nice visual interface for digging through your disk usage. Run `sudo install ncdu` to install it, then use `sudo ncdu -x /` to start analyzing your root directory.
It looks like your `/var` directory might be the culprit since it often holds logs and journals that can grow over time. You might want to investigate it further to see what's taking up space there.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures