# 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="/pages/uoSfg7pzZjhUhgKPr0tt" %}
[show syslog](/island-router-cli-2.3.2/commands/show-syslog.md)
{% endcontent-ref %}

{% content-ref url="/pages/m5afi8XUpJOEZiR3etGE" %}
[write syslog](/island-router-cli-2.3.2/commands/write/write-syslog.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.islandrouter.com/island-router-cli-2.3.2/commands/clear-syslog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
