DROP PACKAGE — remove a package
DROP PACKAGE [ IF EXISTS ] package_name [, ...] [ CASCADE ]
DROP PACKAGE removes packages from the database.
A package can only be dropped by its owner or a superuser. Note that the owner can drop the package (and thereby all contained objects) even if they do not own some of the objects within the package.
IF EXISTSDo not throw an error if the package does not exist. A notice is issued in this case.
package_nameThe name of a package.
CASCADEAutomatically drop objects (tables, functions, etc.) that are contained in the package, and in turn all objects that depend on those objects (see Section 5.15).
Using the CASCADE option might make the command
find objects to be removed in other packages besides the one(s) named.
In this case, other packages are dropped as well.
To remove package counter from the database,
along with everything it contains and all the dependent objects:
DROP PACKAGE counter CASCADE;