# 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

<OSTab items="[&#x22;Linux&#x22;, &#x22;macOS&#x22;, &#x22;Windows&#x22;]">
  <Tab value="Linux" id="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" id="debian-ubuntu">
        ```shell
        sudo apt remove coder
        ```
      </Tab>

      <Tab value="Fedora, CentOS, RHEL, SUSE" id="fedora-centos-rhel-suse">
        ```shell
        sudo yum remove coder
        ```
      </Tab>

      <Tab value="Alpine" id="alpine">
        ```shell
        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:

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

  <Tab value="macOS" id="macos">
    ```shell
    brew uninstall coder
    ```

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

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

  <Tab value="Windows" id="windows">
    ```powershell
    winget uninstall Coder.Coder
    ```
  </Tab>
</OSTab>

## Coder as a system service configuration

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

## 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" id="linux-1">
    ```shell
    rm -rf ~/.config/coderv2
    rm -rf ~/.cache/coder
    ```
  </Tab>

  <Tab value="macOS" id="macos-1">
    ```shell
    rm -rf ~/Library/Application\ Support/coderv2
    ```
  </Tab>

  <Tab value="Windows" id="windows-1">
    ```powershell
    rmdir %AppData%\coderv2
    ```
  </Tab>
</OSTab>
