Disk Cleanup is a function that helps you free up some space on your server’s hard disk by deleting obsolete or temporary files. You should use it when your disk usage is high or when you want to optimize your server’s performance. Here is what it does:

  • Disk Cleanup empties all web application access and error logs, which are files that record the requests and responses of your web applications. These files can grow large over time, and take up a lot of disk space.
  • It removes all rotated logs of web applications and logs under /var/log/, which are older versions of the logs that are compressed and archived. These files are usually kept for backup or troubleshooting purposes, but you may not need them if you have other backup solutions or if you don’t encounter any issues with your web applications.
  • It clears the apt cache, which is a folder that stores the downloaded packages and metadata of the software you install or update using the apt command. These files are useful for faster installation or reinstallation, but they can also accumulate over time and consume disk space.
  • It clears the mysql bin log of files that are older than three days, which are files that record the changes made to your mysql database. These files are useful for replication or recovery purposes, but they can also grow large over time and take up disk space.

This function is safe to run in a production server, as it will not affect the functionality or data of your web applications or database. However, you should always make sure to have a backup of your important files before running any disk cleanup function.

How to Perform Disk Cleanup on RunCloud

You can run the disk cleanup utility directly from the RunCloud dashboard to clean up any obsolete files on your RunCloud server.

  1. Go to your server dashboard and switch to the “Health” tab. Here you can see the current server usage statistics.
  1. Click on the “Disk Cleanup” button on the top right of the screen to initiate the disk cleanup process. This will open up a modal asking you to confirm your action.
  1. Click on “Clean” to confirm it. This will start the cleanup process in the background. The RunCloud agent will automatically locate and delete all of the obsolete files to release space.