# clear syslog

## Syntax

```
clear syslog [<directory>] <file>
```

## Syntax Description

<table><thead><tr><th width="203">Keyword</th><th>Description</th></tr></thead><tbody><tr><td>directory</td><td>(Optional)The log directory containing the log file.</td></tr><tr><td>file</td><td>The name of the file to be deleted.</td></tr></tbody></table>

## Defaults

If is not specified, the top-level log directory is assumed.

## Usage Guidelines

This command deletes a system log file.

&#x20;To see a list of system log files, use the `show syslog ?` command.

## Examples

```
clear syslog backup.log
clear syslog slog 20240514-151755
```

## Related Commands

{% content-ref url="show-syslog" %}
[show-syslog](https://docs.islandrouter.com/island-router-cli-2.3.2/commands/show-syslog)
{% endcontent-ref %}

{% content-ref url="write/write-syslog" %}
[write-syslog](https://docs.islandrouter.com/island-router-cli-2.3.2/commands/write/write-syslog)
{% endcontent-ref %}
