View a markdown version of this page

DROP LIBRARY - Amazon Redshift

Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases. For more information on the details of Python end of life and migration options, see the blog post that was published on June 30, 2025.

DROP LIBRARY

Removes a custom Python library from the database. Only the library owner or a superuser can drop a library.

DROP LIBRARY can't be run inside a transaction block (BEGIN … END). For more information about transactions, see Isolation levels in Amazon Redshift.

This command isn't reversible. The DROP LIBRARY command commits immediately. If a UDF that depends on the library is running concurrently, the UDF might fail, even if the UDF is running within a transaction.

For more information, see CREATE LIBRARY.

Required privileges

Following are required privileges for DROPLIBRARY:

  • Superuser

  • Users with the DROP LIBRARY privilege

  • Library owner

Syntax

DROP LIBRARY library_name

Parameters

library_name

The name of the library.