When I migrated my websites over a month ago i was only using 113GB now I am about to hit 200GB. I cleaned up any previous Kernals but still the space is dwindling on my 500GB drive.
Any idea what may be eating up my hard drive space? I checked my top clients and they are not increasing their space that much.
How about log files? I find log files at times can grow out of control, and having too many copies can also be a problem. This is usually linked with a buggy website which is producing lots of errors.
If you’re “error logs” for website(s) is growing large, it’s time to inspect it and fix the underlying issues.
/var/log/virtualmin
That’s where logs related to websites live – both access and error along with any archived copies based on log rotation rules.
/var/log
That’s generally where most other logs live.
Also if you’re running a WordPress website, be sure to inspect to see if it’s been hacked – many hacks populate the “public_html” and subdirectories with spammy content, your database with bogus content, or both.
Aside from that, it’s just a guessing game as you haven’t really told us a whole lot about your setup and where the files are growing.
Double check your backup log. Make sure it’s not either erroring out (in which case you might have a bunch of temp files bogging down the system) or that it’s keeping a copy on your main drive.
You can install ncdu and run it at your cli.
It will show you, which amount of filessize each directory contain.
With the Keypress d you can delete files, or see h for help to see an overview of available commands.
The only thing I’ve had issue with “recently” is it not clearing up old kernels… which has resulted in many Gb of pointless old kernels sat around until the disk gets full.
see if you have much in your /lib/modules folder and if so you can try apt autoremove
Find all files larger than 100Mb, reporting their size, and ordering them largest to smallest, whilst throwing away warnings about files that can’t be read due to permissions: find / -type f -size +100M -exec ls -lh {} \; 2> /dev/null | awk '{ print $NF ": " $5 }' | sort -nrk 2,2
Whenever my drive is getting full and I’m not sure what the source is I open the File Manager, navigate up to the drive’s root, Select All, right-click > Properties > Calculate Selected Size. This will give you the total size of every folder in the root. Open the largest offending directory and repeat until you get all the way down to the ultimate cause. Assuming the issue is coming from a single root cause this generally gets to the bottom of it.