# Deinstallieren von Postgres auf Fedora

Quelle: [https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757](https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757)

<p class="callout info">Be sure to elevate the privileges for any of the commands in this article with `<span class="text">sudo</span>` if the terminal returns a `<span class="text">Permission denied</span>` error.</p>

## Uninstall and remove PostgreSQL packages on Fedora Linux

You can use the DNF repository’s `<span class="text">dnf</span>` command to uninstall PostgreSQL on Fedora-based distributions of Linux:

`<span class="kw2">sudo dnf remove </span>postgresql`

To use a wildcard operator (`<span class="text">*</span>`) to remove *all* packages with names beginning with `<span class="text">postgres</span>`, use the following command:

`sudo dnf <span class="kw2">remove </span>postgres\<span class="sy0">*</span>`

Be sure to remove the `<span class="text">pgsql</span>` directory as well:

`<span class="kw2">sudo rm </span><span class="sy0">/</span>var<span class="sy0">/</span>lib<span class="sy0">/</span>pgsql -d -r`