From 0592d98984f8f2fab41dedaad9aba972a9a94470 Mon Sep 17 00:00:00 2001 From: achiverram28 <97288756+achiverram28@users.noreply.github.com> Date: Wed, 24 May 2023 15:42:27 +0530 Subject: [PATCH] Update install-kubectl-macos.md Adding the delete kubectl in macOs --- .../docs/tasks/tools/install-kubectl-macos.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/content/en/docs/tasks/tools/install-kubectl-macos.md b/content/en/docs/tasks/tools/install-kubectl-macos.md index 5fdda83fe3..fe8581ddf2 100644 --- a/content/en/docs/tasks/tools/install-kubectl-macos.md +++ b/content/en/docs/tasks/tools/install-kubectl-macos.md @@ -287,6 +287,32 @@ Below are the procedures to set up autocompletion for Bash, Fish, and Zsh. rm kubectl-convert kubectl-convert.sha256 ``` +### Deletion of kubectl on macOS + +The following methods exist for deleting ```kubectl``` on macOS: + +Type in the below command to check where kubectl is installed on your macOS: + +```bash +where kubectl +``` + +(Usually the kubectl installation guides to move the ```kubectl``` binary to ```/usr/local/bin/``` , like ```/usr/local/bin/kubectl```) + +See the outputs of the command and type in the below command to remove it + +```bash +sudo rm ##replace path with that of the output , eg : sudo sudo rm /usr/local/bin/kubectl +``` + +If you have installed ```kubectl``` on macOS using ```brew``` , you can just type in the below command to remove it. + +```bash +brew remove kubectl +``` + ## {{% heading "whatsnext" %}} {{< include "included/kubectl-whats-next.md" >}} + +