Skip to content

Commit 6b1f65f

Browse files
authored
Merge pull request #41300 from achiverram28/patch-1
Document steps for deleting kubectl on macOS
2 parents bb67b63 + 37ca580 commit 6b1f65f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

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

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

290+
### Uninstall kubectl on macOS
291+
292+
Depending on how you installed `kubectl`, use one of the following methods.
293+
294+
### Uninstall kubectl using the command-line
295+
296+
1. Locate the `kubectl` binary on your system:
297+
298+
```bash
299+
where kubectl
300+
```
301+
302+
1. Remove the `kubectl` binary:
303+
304+
```bash
305+
sudo rm <path>
306+
```
307+
Replace `<path>` with the path to the `kubectl` binary from the previous step. For example, `sudo rm /usr/local/bin/kubectl`.
308+
309+
### Uninstall kubectl using homebrew
310+
311+
If you installed `kubectl` using Homebrew, run the following command:
312+
313+
```bash
314+
brew remove kubectl
315+
```
316+
290317
## {{% heading "whatsnext" %}}
291318

292319
{{< include "included/kubectl-whats-next.md" >}}
320+
321+

0 commit comments

Comments
 (0)