Skip to content

Cleanup System ​

Overview ​

Over time, a server piles up log files, old installation packages and cached data that fill the disk. The Cleanup System utility removes these unneeded files to free up space. Your website source code, databases and configuration are not affected.

Use it when the disk is almost full, when an event fails with No space left on device, or schedule it to keep the server tidy.

What gets cleaned ​

  • System logs: empties some system log files (auth.log, kern.log, ufw.log…) and deletes old compressed or rotated log files in /var/log.
  • Supervisor and CronJob logs: deletes old compressed or rotated log files.
  • OpenLiteSpeed logs: empties the web server logs (if the server uses OpenLiteSpeed).
  • Software packages: removes unused packages, clears the downloaded package cache and leftover configuration of removed packages.
  • npm cache: clears the npm cache.
  • System journal: limits the journal to 100 MB and keeps only the last 10 days.

The Output of the Clean System event shows the disk space used before and after the cleanup.

Run a one-time cleanup ​

  1. Open the server and find the Utilities group on the overview page.
  2. Click Cleanup System.
  3. Click Agree. If the server already has a cleanup schedule, Enable Schedule is checked; leave it checked so the schedule is kept.
  4. Watch the Clean System event on the Events page. The cleanup usually takes a few minutes; the server keeps running normally in the meantime.

Schedule automatic cleanup ​

Paid feature

Scheduled cleanup is only available for servers on a paid plan. One-time cleanup works on every plan.

  1. Open the Cleanup System utility.
  2. Check Enable Schedule. The default schedule is 0 0 * * * (every day at midnight, in the server's time zone).
  3. To change it, click Template and pick a preset (for example Daily at Midnight or Weekly (Sunday)), or fill in the Minute, Hour, Day of month, Month and Day of week fields yourself. See Cron Job for the syntax.
  4. Click Agree. FlashPanel saves the schedule and runs a cleanup right away.

The schedule is created as a task named [FlashPanel] Auto Cleanup System in the server's CronJob menu. When you open the utility again, Enable Schedule is already checked with the current schedule. To change the schedule, edit the cron expression and click Agree (a cleanup also runs right away).

Turn off scheduled cleanup ​

  1. Open the Cleanup System utility.
  2. Uncheck Enable Schedule.
  3. Click Agree. FlashPanel deletes the existing cleanup schedule and runs one more cleanup.

You can also delete the [FlashPanel] Auto Cleanup System task in the server's CronJob menu; this does not run a cleanup.