Skip to content

Commit 0592d98

Browse files
authored
Update install-kubectl-macos.md
Adding the delete kubectl in macOs
1 parent 81fd15a commit 0592d98

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

content/en/docs/tasks/tools/install-kubectl-macos.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,32 @@ Below are the procedures to set up autocompletion for Bash, Fish, and Zsh.
287287
rm kubectl-convert kubectl-convert.sha256
288288
```
289289

290+
### Deletion of kubectl on macOS
291+
292+
The following methods exist for deleting ```kubectl``` on macOS:
293+
294+
Type in the below command to check where kubectl is installed on your macOS:
295+
296+
```bash
297+
where kubectl
298+
```
299+
300+
(Usually the kubectl installation guides to move the ```kubectl``` binary to ```/usr/local/bin/``` , like ```/usr/local/bin/kubectl```)
301+
302+
See the outputs of the command and type in the below command to remove it
303+
304+
```bash
305+
sudo rm <path> ##replace path with that of the output , eg : sudo sudo rm /usr/local/bin/kubectl
306+
```
307+
308+
If you have installed ```kubectl``` on macOS using ```brew``` , you can just type in the below command to remove it.
309+
310+
```bash
311+
brew remove kubectl
312+
```
313+
290314
## {{% heading "whatsnext" %}}
291315

292316
{{< include "included/kubectl-whats-next.md" >}}
317+
318+

0 commit comments

Comments
 (0)