Hello.I have 50gb of disk space and 33.67 in use. The 4 websites I have in total are about 7.5gb. How can I see the approximately 26gb that are taking up space, in which folders - files? I don’t think the 26gb is from virtualmin? Can I use a command from ssh?
Do the same command but in a different directory all you are getting are results from the roots home directory try doing cd / before you run the du command
Depending on the age of your system journal log can grow over time. Below you can use these commands to see how big the log is and prune it a bit if needed.
To view space used by journal journalctl --disk-usage
Restirct number of log files sudo journalctl --vacuum-files=5
to remove old logs from journal sudo journalctl --vacuum-time=7d
Restrict log size - They can get pretty high as up to 12GB sudo journalctl --vacuum-size=1G
Another culprit can be the number of old kernels left after a new kernel update.
If you run apt-get update you may sometimes see additional lines indicating old kernels not being used by the system and will give you a command to remove them.
The max-depth parameter says how many levels of directory to traverse (and -x says one-filesystem, so it won’t traverse any other filesystems…so if you have multiple partitions or volumes, you’ll need to do this on all of them, but you don’t want to include virtual filesystems and such). So, just find the biggest directory in / and then do it with a larger depth on that directory. e.g., if you find the biggest directory is /home (pretty common):
du -xh --max-depth=2 /home
Where disk is being used is not a mystery. Use the tools you have to find where usage is happening.
Virtualmin’s file manager has a superpower which we have all forgotten to mention thus far: select one or more directories in Virtualmin’s File Manager, right click on one of the selected directories and mouse-over on (the edge of) Properties till you see Calculate Size. Hit it to see numbers next to all the selected directories.
It shows the space occupied by the directory and all its files and subdirectories. One could drill down using Virtualmin’s GUI till one finds the directory which is using up the disk space that it should not.
We were harassing poor @dimgr with CLI commands when there was an easy way to do everything that he wanted in Webmin / Virtualmin File Manager.
@calport Very cool suggestion, GUI is always better for us (i.e. me) Windows users.
After look at the file manager settings you can also select stuff and then press the space bar to calculate size but this seems a bit inconsistent, unless I am using it wrong.
surly there should be an option (I know there isn’t) for file manager to do that calculation by default, a simple on/off toggle would do, rather than banging the space bar a few times to get the sizes of the directories displayed, mind you this is off topic I may open a new thread