Remove Extension

How to safely remove a PostgreSQL extension from a database cluster?

To uninstall an extension, you typically need to perform the following steps:

DROP EXTENSION "<extname>";

Note that if there are other extensions or database objects dependent on this extension, you will need to uninstall/remove those dependencies first before uninstalling the extension.

Alternatively, you can use the following statement to forcefully uninstall the extension and its dependencies in one go:

DROP EXTENSION "<extname>" CASCADE;

Note: The CASCADE option will delete all objects that depend on this extension, including database objects, functions, views, etc. Use with caution!

If you wish to remove the extension’s package, you can use your operating system’s package manager to uninstall it:


Last modified 2024-08-04: add extensions (25d8a2b6)