> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# UNINSTALL PLUGIN

> UNINSTALL PLUGIN is used to uninstall a plugin.

UNINSTALL PLUGIN is used to uninstall a plugin.

**Tip**

This operation requires the SYSTEM-level PLUGIN privilege. You can follow the instructions in [GRANT](/documents/4.2/sql-reference/sql-statements/account-management/GRANT.md) to grant this privilege.

## Syntax

```SQL theme={null}
UNINSTALL PLUGIN [IF EXISTS] <plugin_name>
```

**IF EXISTS**: If specified, the statement succeeds silently when the plugin does not exist instead of returning an error.

plugin\_name can be viewed through SHOW PLUGINS command

Only non-builtin plugins can be uninstalled.

## Examples

1. Uninstall a plugin:

   ```SQL theme={null}
   UNINSTALL PLUGIN auditdemo;
   ```

2. Uninstall a plugin if it exists:

   ```SQL theme={null}
   UNINSTALL PLUGIN IF EXISTS auditdemo;
   ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.