This command was useful to find out where the space was being used:
Then I found out Ubuntu doesn't delete old kernel images (which can take up several GBs over time) automatically, one has to do this manually. Here's how:cd / sudo du -sh * .
First, run these commands to do some maintenance / cleanup:
There are several ways to find out all installed kernel image versions and delete them, but I chose to go with this one, because it seemed to be the most straight-forward and the least prone to error:sudo apt-get autoremove --purge sudo apt-get autoclean sudo apt-get clean
Find out your current kernel version:sudo apt-get install synaptic
This is your current version, which you DO NOT (!) want to uninstall.uname -r
Then start Synaptic.
In the "Quick filter", type "linux-image".
That will show a list of all packages which match that name, among which are several named like this: "linux-image-X.XX...". Highlight all the older versions (be careful NOT TO select your currently installed version), then right-click and select "Mark for complete removal". It will ask you if you also want to remove packages associated with these. Yes, you do. Then hit "Apply".
This will take a while, depending on how many old kernels you have installed. On my system, about 8 GB of space was freed after this.
Once that's done, enter "linux-header" in the quick-filter and repeat the procedure. Again, be careful not to remove your current kernel-version. On my system, about 3 GBs of space were freed after this.
Post a Comment