# Uninstall NGINX Agent




## Overview

Follow the steps in this guide to remove F5 NGINX Agent from your NGINX instances.

## Before you begin

The user following performing the uninstall steps needs to have `root` privilege.

## Uninstall NGINX Agent

Complete the following steps on each host where you've installed NGINX Agent

### Uninstall NGINX Agent on Alpine Linux

#### Expand instructions

Complete the following steps on each host where you've installed NGINX agent:

1. Stop NGINX agent:

   ```shell
   sudo rc-service nginx-agent stop
   ```

1. To uninstall NGINX agent, run the following command:

   ```shell
   sudo apk del nginx-agent
   ```

### Uninstall NGINX Agent on Amazon Linux

#### Expand instructions

Complete the following steps on each host where you've installed NGINX agent:

1. Stop NGINX agent:

   ```shell
   sudo systemctl stop nginx-agent
   ```

1. To uninstall NGINX agent, run the following command:

   ```shell
   sudo yum remove nginx-agent
   ```

### Uninstall NGINX Agent on Debian

#### Expand instructions

Complete the following steps on each host where you've installed NGINX Agent:

1. Stop NGINX Agent:

   ```shell
   sudo systemctl stop nginx-agent
   ```

1. To uninstall NGINX Agent, run the following command:

   ```shell
   sudo apt-get remove nginx-agent
   ```

   **Note:**  The `apt-get remove <package>` command will remove the package from your system, while keeping the associated configuration files for possible future use. If you want to completely remove the package and all of its configuration files, you should use `apt-get purge <package>`.

### Uninstall NGINX Agent on RHEL, CentOS, Rocky Linux, AlmaLinux, and Oracle Linux

#### Expand instructions

Complete the following steps on each host where you've installed NGINX Agent:

1. Stop NGINX Agent:

   ```shell
   sudo systemctl stop nginx-agent
   ```

1. To uninstall NGINX Agent, run the following command:

   ```shell
   sudo yum remove nginx-agent
   ```

### Uninstall NGINX Agent on SLES

#### Expand instructions

Complete the following steps on each host where you've installed NGINX Agent:

1. Stop NGINX agent:

   ```shell
   sudo systemctl stop nginx-agent
   ```

1. To uninstall NGINX agent, run the following command:

   ```shell
   sudo zypper remove nginx-agent
   ```

### Uninstall NGINX Agent on Ubuntu

#### Expand instructions

Complete the following steps on each host where you've installed NGINX Agent:

1. Stop NGINX Agent:

   ```shell
   sudo systemctl stop nginx-agent
   ```

1. To uninstall NGINX Agent, run the following command:

   ```shell
   sudo apt-get remove nginx-agent
   ```

   **Note:**  The `apt-get remove <package>` command will remove the package from your system, while keeping the associated configuration files for possible future use. If you want to completely remove the package and all of its configuration files, you should use `apt-get purge <package>`.


