I recently upgraded an old VM from Ubuntu 18.04 to 20.04 and 22.04.
Before the update, I had ~50GB of free space, now I have 24GB.
I already run apt autoremove
, I purged unused kernel files and emptied apt cache.
I also completely removed mySql, and deleted all the DB files, since they weren't in use anymore, but I just gained few GBs.
Is there something more that I can do to free up some disk space? Maybe some other cache or temporary files that might have been left on disk?
I connect to the VM via SSH, so I cannot use any "visual" software to understand were the large files are, and what they are.
Thank you in advance.
Asked
Active
Viewed 469 times
0

simonelippolis
- 53
- 6
-
1Look for what is taking up space. The `tree` command is your friend. – Massimo Jan 26 '23 at 00:07
-
Thanks! I found out that there are 26GB+ of space taken by /var/lib/fail2ban I need to understand if it is safe to remove those files or not. – simonelippolis Jan 26 '23 at 09:01
1 Answers
0
I used ncdu
to browse the directory tree. I was able to find out that the fail2ban folder in /var/lib/fail2ban
contained more than 30GB of old databases. Removing them, everything is now back to normal.

simonelippolis
- 53
- 6