I recently had the disk space problem again, so I resized the partitions as described in an earlier article to give my home partition a bit more space. I needed this as I have a lot of projects in my working projects directory, additionally I am preparing a talk for a conference, where I need to convert virtual machine file system files, and those are quite big.
You might think that due to current harddrive capacities you wouldn’t run into this problem, but when you are using containers as a vehicle for doing stuff, you might need to download those, which can lead to having stored a lot of images that might even be very big. Thus you can run quickly into that situation where the root partition is filled up with 50GB, which in my case happens pretty often.
To be the most effective you should know where the space gets eaten up, so start Disk Usage Analyzer to give you a neat overview of where the most space is used.
If you still are using docker as a container runtime then you might have a lot of image files that you might not need any more:
$ docker system prune -a
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
Are you sure you want to continue? [y/N]
...
You might also have some dangling volumes around that might get needed to clean up:
$ docker volume prune
WARNING! This will remove all local volumes not used by at least one container.
Are you sure you want to continue? [y/N]
...
As my install is pretty old, since I always do an upgrade instead of a clean reinstall whenever a new Fedora version comes out, I had quite a bit of log files dangling around:
# journalctl --disk-usage
Archived and active journals take up 3.9G in the file system.
[root@dhiller-fedora-work opt]# journalctl --vacuum-size=1G
...
Vacuuming done, freed 2.9G of archived journals from /var/log/journal/de0c95d62c9a48e59f67e64d59542e3b.
[root@dhiller-fedora-work opt]# journalctl --disk-usage
Archived and active journals take up 1.0G in the file system.
Sources: