Skip to content

Commit ce2de2f

Browse files
authored
Modified deletion of kubectl on macOS.
1 parent 0592d98 commit ce2de2f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,25 +287,28 @@ 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
290+
### Uninstall kubectl on macOS
291291

292-
The following methods exist for deleting ```kubectl``` on macOS:
292+
Depending on how you installed ```kubectl```, use one of the following methods.
293293

294-
Type in the below command to check where kubectl is installed on your macOS:
294+
### Uninstall kubectl using the command-line
295+
296+
1. Locate the ```kubectl``` binary on your system:
295297

296298
```bash
297299
where kubectl
298300
```
299301

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
302+
2. Remove the ```kubectl``` binary:
303303

304304
```bash
305-
sudo rm <path> ##replace path with that of the output , eg : sudo sudo rm /usr/local/bin/kubectl
305+
sudo rm <path>
306306
```
307+
Replace 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
307310

308-
If you have installed ```kubectl``` on macOS using ```brew``` , you can just type in the below command to remove it.
311+
If you installed ```kubectl``` using ```homebrew```, run the following command:
309312

310313
```bash
311314
brew remove kubectl

0 commit comments

Comments
 (0)