---
name: "pg_dropcluster"
section: "8"
platform: "linux"
package: "postgresql-common"
version: "134wheezy4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/pg_dropcluster/8"
---

# pg\_dropcluster(8)

completely delete a PostgreSQL cluster

## NAME

pg\_dropcluster - completely delete a PostgreSQL cluster

## SYNOPSIS

**pg\_dropcluster** \[**--stop**\] *cluster-version* *cluster-name*

## DESCRIPTION

This program removes all files that belong to a given PostgreSQL cluster; that includes the data directory, the log file, and all configuration files that were created by [*pg\_createcluster*(1)](/pg_createcluster/1.md). If the configuration directory (`/etc/postgresql/`*version*`/`*cluster*) is empty after this, it is removed as well. An empty socket directory other than **/var/run/postgresql** or **/tmp** is also removed.

Usually a cluster which still has a running server attached will not be deleted. To override this, the **--stop** option forces a server shutdown before the files are removed.

## SEE ALSO

[*pg\_createcluster*(1)](/pg_createcluster/1.md), [*pg\_ctlcluster*(1)](/pg_ctlcluster/1.md)

## AUTHOR

Martin Pitt \<mpitt@debian.org\>
