---
name: "drop_user"
section: "7"
platform: "linux"
package: "postgresql"
version: "7.4.7-6sarge6"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/drop_user"
---

# drop\_user(7)

remove a database user account

## NAME

DROP USER - remove a database user account

## SYNOPSIS

```
DROP USER name

```

## DESCRIPTION

**DROP USER** removes the specified user. It does not remove tables, views, or other objects owned by the user. If the user owns any database, an error is raised.

## PARAMETERS

- *name*

  The name of the user to remove.

## NOTES

PostgreSQL includes a program dropuser \[[**dropuser**(1)](/dropuser/1.md)\] that has the same functionality as this command (in fact, it calls this command) but can be run from the command shell.

To drop a user who owns a database, first drop the database or change its ownership.

## EXAMPLES

To drop a user account:

```
DROP USER jonathan;

```

## COMPATIBILITY

The **DROP USER** statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation.

## SEE ALSO

ALTER USER \[[**alter\_user**(7)](/alter_user/7.md)\], CREATE USER \[**create\_user**(l)\]
