Cleaning Up Files with the CLI

You can use the CLI request system storage cleanup command to rotate log files and delete unnecessary files on the services router. If you are running low on storage space, the file cleanup procedure quickly identifies files that can be deleted.

The file cleanup procedure performs the following tasks:

To rotate log files and delete unnecessary files with the CLI:

  1. Enter operational mode in the CLI.
  2. To rotate log files and identify the files that can be safely deleted, enter the following command:

    user@host> request system storage cleanup

    The device rotates log files and displays the files that you can delete.

  3. Enter yes at the prompt to delete the files.

Note: You can issue the request system storage cleanup dry-run command to review the list of files that can be deleted with the request system storage cleanup command, without actually deleting the files.

On SRX Series devices, the /var hierarchy is hosted in a separate partition (instead of the root partition). If JUNOS Software installation fails as a result of insufficient space:

  • Use the request system storage cleanup command to delete temporary files.
  • Delete any user-created files in both the root partition and under the /var hierarchy.