In this tutorial, we will describe how to recover disk space by root or using cPanel.
cPanel frequently reports an inaccurate value for the /mail/ directory in the cPanel->Disk Usage interface.
- The value returned by the shell in our test case is 310MB:
root@web [/home/mmtest]# du -sh mail 310M mail root@web [/home/mmtest]#
Using Root Directory
However, cPanel reports a value of 562.89MB, This is due to the dovecot server failing to update the disc use accurately.
- Run the commands below to rectify the problem:
# /scripts/generate_maildirsize --confirm --allaccounts --verbose $username
root@web [/home/mmtest]# /scripts/generate_maildirsize --confirm --allaccounts --verbose mmtest Rebuilding the maildirsize files for: mmtest Rebuilding the maildirsize files for: arsam@mmtest133.com Checking user mmtest Calculating diskusage and diskcount from reading files Writing /home/mmtest/mail/maildirsize for user merches Checking user arsam@mmtest133.com Calculating diskusage and diskcount from reading files Writing /home/mmtest/mail/mmtest133.com/john/maildirsize for user john root@web [/home/mmtest]#
After that, cPanel will report disc utilization correctly.
Using cPanel to check Disk Space
- Log into your cPanel account:
- Under the heading “Files,” select “Disk Usage”:
- By clicking the “>” on the left of the folder name at the bottom of the page, you can expand the folders:
This will provide more information about each folder as well as the amount of disc space used.