(866) 366-3640 - support@sagonet.com
Sago Logo
Banner

   
Log in / create account Page Discussion History Go to the site toolbox
How do I clear a full partition in CPanel

If you are receiving email from the server or notice that a partition is near or at 100% full, check out some of the following solutions. Usually, /var is what fills up first. This is because /var holds all the system logs. To see what directory/log is taking up all the room, start at the base.

So now we are in /var/ . Type "du -sh *" to show how much space is used/available in each directory as well as the file sizes of each file in the current directory. The 'offending' directory/file should be fairly obvious. Once you see what directory is taking up all the space, cd to it and type the same command again; follow this pattern until you find the files taking up all the space. Once found, you can either delete the files or if you'd like to save some of the most recent entries to it, you can type this:

tail -5000 filename > filename.new
mv filename.new filename
sync

This will copy the last 5000 lines from the file to a temporary file. Now you probably want to restart whatever service it is that created the file to release it's file lock on the file.

/usr also fills up sometimes because of apache. The first thing you should look at is usually the apache logs.

cd to /usr/local/apache and type "du -sh *" and chances are you'll find that the logs/error_log or logs/access_log is very large.

Feel free to delete them or use the tail trick above.