> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-plugin.md).

# UNINSTALL PLUGIN

## Syntax

```bnf
UNINSTALL PLUGIN [IF EXISTS] plugin_name
```

## Description

This statement removes a single installed [plugin](/docs/server/reference/plugins.md). To uninstall the whole library which contains the plugin, use [UNINSTALL SONAME](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-soname.md). You cannot uninstall a plugin if any table that uses it is open.

`plugin_name` must be the name of some plugin that is listedin the [mysql.plugin](/docs/server/reference/system-tables/the-mysql-database-tables/mysql-plugin-table.md) table. The server executes the plugin's deinitializationfunction and removes the row for the plugin from the `mysql.plugin`table, so that subsequent server restarts will not load and initializethe plugin. `UNINSTALL PLUGIN` does not remove the plugin'sshared library file.

To use `UNINSTALL PLUGIN`, you must have the [DELETE](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md) privilege for the [mysql.plugin](/docs/server/reference/system-tables/the-mysql-database-tables/mysql-plugin-table.md) table.

#### IF EXISTS

If the `IF EXISTS` clause is used, MariaDB will return a note instead of an error if the plugin does not exist. See [SHOW WARNINGS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-warnings.md).

## Examples

```sql
UNINSTALL PLUGIN example;
```

```sql
UNINSTALL PLUGIN IF EXISTS example;
Query OK, 0 rows affected (0.099 sec)

UNINSTALL PLUGIN IF EXISTS example;
Query OK, 0 rows affected, 1 warning (0.000 sec)

SHOW WARNINGS;
+-------+------+-------------------------------+
| Level | Code | Message                       |
+-------+------+-------------------------------+
| Note  | 1305 | PLUGIN example does not exist |
+-------+------+-------------------------------+
```

## See Also

* [Plugin Overview](/docs/server/reference/plugins/plugin-overview.md)
* [mysql\_plugin](/docs/server/clients-and-utilities/legacy-clients-and-utilities/mysql_plugin.md)
* [INSTALL PLUGIN](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-plugin.md)
* [List of Plugins](/docs/server/reference/plugins/list-of-plugins.md)

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}
