# Add/Remove Platform9 CLI

***

### Management of the Platform9 CLI <a href="#management-of-the-platform9-cli" id="management-of-the-platform9-cli"></a>

This page provides instructions to install, update and uninstall the Platform9 CLI.

#### Pre-requisites <a href="#pre-requisites" id="pre-requisites"></a>

The CLI currently supports

* Ubuntu 18.04 / 20.04
* CentOS 7.x
* RHEL 7.x / 8.x

#### Installation <a href="#installation" id="installation"></a>

From the command line of your machine, run the following commands to download the CLI installer and run it to install the CLI.

```
bash <(curl -sL https://pmkft-assets.s3-us-west-1.amazonaws.com/pf9ctl_setup)
```

This will download a script named `cli_setup.sh` and invoke the script. Once the CLI is successfully installed, you can proceed to configure the CLI.

#### Upgrade <a href="#upgrade" id="upgrade"></a>

To upgrade the CLI to the latest version, simply run the `cli-setup.sh` script again.

```
bash ./cli_setup.sh
```

This will update the installed packages if new versions are available in the upstream repository.

{% hint style="info" %}
You will need to specify your PMK account credentials again after running this command.
{% endhint %}

#### Uninstall <a href="#uninstall" id="uninstall"></a>

To uninstall the CLI, you need to remove the installation directories by running `rm -rf ~/pf9 -`. This command removes all PMK package installations, including logs/db/binary. Additionally, running the`rm -rf /usr/bin/pf9ctl` command will remove the pf9ctl soft link.

```
rm -rf ~/pf9 
rm -rf /usr/bin/pf9ctl
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-kubernetes/5.15/pmk-cli/add-remove-platform9-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
