Managing a Linux-based server using aaPanel is simple and effective—but like any web hosting control panel, it requires regular maintenance. Recently, I ran into a common but critical issue: my aaPanel server’s root partition reached 100% usage, effectively halting performance and risking downtime.
In this post, I’ll walk you through:
- How I identified the disk usage problem
- What tools I used to analyze space consumption
- The exact steps I followed to safely clean up space
- Preventive tips to avoid this issue again
⚠️ The Problem: aaPanel Root Partition 100% Full
I was working as usual when I noticed:
- Websites hosted via aaPanel were loading slowly
- SSH sessions lagged
- System alerts showed root disk usage 100% full
Running this command confirmed it:
df -h
The output:
/dev/mapper/ocivolume-root 89G 89G 35M 100% /
This meant no further logs could be written, services might fail to restart, and even backups could fail. It was urgent.
🔍 Step 1: Analyze What’s Using Disk Space
I SSH’d into the server and ran:
find / -xdev -type f -size +100M -exec du -h {} + | sort -hr | head -n 20
This command helped me find the biggest files in the root partition. The top offenders were:
/www/server/panel/logs/task.log– 45 GB- Various web logs in
/www/wwwlogs/– 6 GB+ per file - Old
.tar.gzbackups - MySQL binary logs
🧹 Step 2: Cleanup Actions That Resolved the Issue
Here’s how I safely freed up over 60GB of space:
✅ Truncated the Task Log File
> /www/server/panel/logs/task.log
This command emptied the file contents without deleting the file or breaking any service.
✅ Removed Web Logs
rm -f /www/wwwlogs/*.log
I cleared dozens of log files generated by Nginx and websites hosted on the server.
✅ Deleted Old Backup Archives
rm -f /www/wwwroot/amjidali.com/old_webs/**/*.tar.gz
Alternatively, you can move them to a secondary disk:
mv /www/wwwroot/amjidali.com/old_webs /mnt/amjid-data/
✅ Cleared MySQL Binary Logs (Safe If Not Using Replication)
mysql -u root -p -e "RESET MASTER;"
Or, set automatic cleanup:
[mysqld]
expire_logs_days = 7
✅ Cleared Yum Cache and Temporary Files
yum clean all
rm -rf /tmp/*
rm -rf /var/tmp/*
📊 Step 3: Recheck Disk Space
After cleanup:
df -h
Disk usage dropped from 100% to around 65%, and server performance returned to normal instantly.
🛡️ How to Prevent aaPanel Disk Space Issues in the Future
Here are the best practices I recommend:
- Set up log rotation for all services (Nginx, MySQL, aaPanel)
- Periodically run
du -sh /*to monitor growing directories - Offload old backups to external drives or cloud storage
- Use aaPanel’s file manager to spot heavy directories
- Add a monitoring plugin or cron job to alert when usage crosses 80%
- Use
aaPanel GitHubto stay updated with the latest improvements
✅ Conclusion
If you’re using aaPanel and encounter the “disk space usage full” issue, don’t panic. Follow a structured cleanup strategy:
- Analyze disk usage
- Safely clear large, unused files
- Monitor and automate disk usage checks
This experience reminded me how even small things like log files can accumulate and cause big issues. With the right approach, it’s easy to clean and reclaim space in aaPanel without reinstalling or losing data.