I've followed guide to install kubectl for testing in development environment on Ubuntu 16.04.
Now I would like to remove Kubectl from ubuntu.
sudo -i
Once you get root access then apply command
unset DOCKER_HOST
You can use unset DOCKER_HOST
command to remove/unset the Kubernetes service.
Depending on the method you chose in https://kubernetes.io/docs/tasks/tools/install-kubectl/, it can be any of these:
sudo rm /usr/local/bin/kubectl
gcloud components remove kubectl
snap remove kubectl
In addition, you may need to remove the configuration files in ~/.kube
.