Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


clear log



Release Information

Command introduced before Junos OS Release 7.4.


Remove contents of a log file.


filenameName of the specific log file to delete. Note that the file name cannot contain any special characters, including: ![=;|(){}]
all(Optional) Delete the specified log file and all archived versions of it.

Required Privilege Level


Related Documentation

List of Sample Output

clear log

Output Fields

See file list for an explanation of output fields.

Sample Output

clear log

The following sample commands list log file information, clear the contents of a log file, and then display the updated log file information:

user@host> file list lcc0-re0:/var/log/sampled detail
user@host> clear log lcc0-re0:sampled
user@host> file list lcc0-re0:/var/log/sampled detail