# UNINSTALL SONAME

## Syntax

```sql
UNINSTALL SONAME  [IF EXISTS] 'plugin_library'
```

## Description

This statement is a variant of [UNINSTALL PLUGIN](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-plugin.md) statement, that removes all [plugins](/docs/server/reference/plugins.md) belonging to a specified `plugin_library`. See [UNINSTALL PLUGIN](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-plugin.md) for details.

`plugin_library` is the name of the shared library thatcontains the plugin code. The file name extension (forexample, `libmyplugin.so` or `libmyplugin.dll`) can be omitted (which makes the statement look the same on all architectures).

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

#### IF EXISTS

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

## Examples

To uninstall the XtraDB plugin and all of its `information_schema` tables with one statement, use

```sql
UNINSTALL SONAME 'ha_xtradb';
```

```sql
UNINSTALL SONAME IF EXISTS 'ha_example';
Query OK, 0 rows affected (0.099 sec)

UNINSTALL SONAME IF EXISTS 'ha_example';
Query OK, 0 rows affected, 1 warning (0.000 sec)

SHOW WARNINGS;
+-------+------+-------------------------------------+
| Level | Code | Message                             |
+-------+------+-------------------------------------+
| Note  | 1305 | SONAME ha_example.so does not exist |
+-------+------+-------------------------------------+
```

## See Also

* [INSTALL SONAME](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-soname.md)
* [SHOW PLUGINS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-plugins.md)
* [INSTALL PLUGIN](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/install-plugin.md)
* [UNINSTALL PLUGIN](/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-plugin.md)
* [SHOW PLUGINS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-plugins.md)
* [INFORMATION\_SCHEMA.PLUGINS Table](/docs/server/reference/system-tables/information-schema/information-schema-tables/plugins-table-information-schema.md)
* [mysql\_plugin](/docs/server/clients-and-utilities/legacy-clients-and-utilities/mysql_plugin.md)
* [List of Plugins](/docs/server/reference/plugins/list-of-plugins.md)

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

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


---

# 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://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/plugin-sql-statements/uninstall-soname.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.
