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:
- Rotates log files—All information in the current log files is archived, old archives are deleted, and fresh log files are created.
- Deletes log files in /var/log—Any files that are not currently being written to are deleted.
- Deletes temporary files in /var/tmp—Any files that have not been accessed within two days are deleted.
- Deletes all crash files in /var/crash—Any core files that the device has written during an error are deleted.
- Deletes all software images (*.tgz files) in /var/sw/pkg—Any software images copied to this directory during software upgrades are deleted.
To rotate log files and delete unnecessary files with the CLI:
- Enter operational mode in the CLI.
- To rotate log files and identify the files that
can be safely deleted, enter the following command:
user@host> request system storage cleanupThe device rotates log files and displays the files that you can delete.
- 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 OS installation fails as a result of insufficient space:
|
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
