diff --git a/content/en/docs/tasks/tools/install-kubectl-macos.md b/content/en/docs/tasks/tools/install-kubectl-macos.md index 5fdda83fe3..0ab0c494c0 100644 --- a/content/en/docs/tasks/tools/install-kubectl-macos.md +++ b/content/en/docs/tasks/tools/install-kubectl-macos.md @@ -287,6 +287,35 @@ Below are the procedures to set up autocompletion for Bash, Fish, and Zsh. rm kubectl-convert kubectl-convert.sha256 ``` +### Uninstall kubectl on macOS + +Depending on how you installed `kubectl`, use one of the following methods. + +### Uninstall kubectl using the command-line + +1. Locate the `kubectl` binary on your system: + + ```bash + where kubectl + ``` + +1. Remove the `kubectl` binary: + + ```bash + sudo rm + ``` + Replace `` with the path to the `kubectl` binary from the previous step. For example, `sudo rm /usr/local/bin/kubectl`. + +### Uninstall kubectl using homebrew + +If you installed `kubectl` using Homebrew, run the following command: + +```bash +brew remove kubectl +``` + ## {{% heading "whatsnext" %}} {{< include "included/kubectl-whats-next.md" >}} + +