# Uninstall

This article walks you through how to uninstall your Coder server.

To uninstall your Coder server, delete the following directories.

## The Coder server binary and CLI [#the-coder-server-binary-and-cli]

<OSTab items="[&#x22;Linux&#x22;, &#x22;macOS&#x22;, &#x22;Windows&#x22;]">
  <Tab value="Linux">
    <Tabs items="[&#x22;Debian, Ubuntu&#x22;, &#x22;Fedora, CentOS, RHEL, SUSE&#x22;, &#x22;Alpine&#x22;]" groupId="coder-docs-tab:alpine-debian-ubuntu-fedora-centos-rhel-suse" persist="true">
      <Tab value="Debian, Ubuntu">
        ```sh
        sudo apt remove coder
        ```
      </Tab>

      <Tab value="Fedora, CentOS, RHEL, SUSE">
        ```sh
        sudo yum remove coder
        ```
      </Tab>

      <Tab value="Alpine">
        ```sh
        sudo apk del coder
        ```
      </Tab>
    </Tabs>

    If you installed Coder manually or used the install script on an unsupported
    operating system, you can remove the binary directly:

    ```sh
    sudo rm /usr/local/bin/coder
    ```
  </Tab>

  <Tab value="macOS">
    ```sh
    brew uninstall coder
    ```

    If you installed Coder manually, you can remove the binary directly:

    ```sh
    sudo rm /usr/local/bin/coder
    ```
  </Tab>

  <Tab value="Windows">
    ```ps1
    winget uninstall Coder.Coder
    ```
  </Tab>
</OSTab>

## Coder as a system service configuration [#coder-as-a-system-service-configuration]

```sh
sudo rm /etc/coder.d/coder.env
```

## Coder settings, cache, and the optional built-in PostgreSQL database [#coder-settings-cache-and-the-optional-built-in-postgresql-database]

There is a `postgres` directory within the `coderv2` directory that has the
database engine and database. If you want to reuse the database, consider not
performing the following step or copying the directory to another location.

<OSTab items="[&#x22;Linux&#x22;, &#x22;macOS&#x22;, &#x22;Windows&#x22;]">
  <Tab value="Linux">
    ```sh
    rm -rf ~/.config/coderv2
    rm -rf ~/.cache/coder
    ```
  </Tab>

  <Tab value="macOS">
    ```sh
    rm -rf ~/Library/Application\ Support/coderv2
    ```
  </Tab>

  <Tab value="Windows">
    ```ps1
    rmdir %AppData%\coderv2
    ```
  </Tab>
</OSTab>
