DESTROYDB(1) | General Commands Manual | DESTROYDB(1)

# NAME

`destroydb` —
destroy an existing INGRES database

# SYNOPSIS

`destroydb` | [`-s`] [`-m`] dbname

# DESCRIPTION

The `destroydb` utility removes all reference to an existing database. The directory of the database and all files in that directory will be removed.

The options are as follows:

`-s`
  Allow the INGRES superuser to destroy a database owned by another user. To execute this command without this flag, the current user must be the database administrator for the database in question.
`-m`
  Do not remove the directory itself. This is useful when the directory is a separate mounted file system.

# EXAMPLES

`destroydb demo`
`destroydb -s erics_db`

# FILES

.../data/base/*
  Database storage directory.

# DIAGNOSTICS

invalid dbname
  The database name specified is not a valid name.
you may not reference this database
  The database may exist, but permission to access it is denied.
you may not use the -s flag
  Only the INGRES superuser may use the `-s` flag.
you are not the dba
  Someone else created this database.
database does not exist
  The specified database does not exist.

# SEE ALSO

creatdb(1), ingres(1)

# HISTORY

Originally part of UC Berkeley INGRES 8.9 (1988).

March 28, 2026 | NetBSD 10.1_STABLE