How to uninstall AWS CLI from MAC

Below are the steps to uninstall AWS CLI from MAC.

Go to Terminal and type which aws

which aws

The output will be like this: usr/local/bin/aws.

Find the symlinks for that path:

ls -l /usr/local/bin/aws

The output will be like this:

lrwxr-xr-x  1 root  wheel  22 May  7 18:22 /usr/local/bin/aws -> /usr/local/aws-cli/aws

Delete the following folders to remove it completely:

sudo rm /usr/local/bin/aws
sudo rm /usr/local/bin/aws_completer
sudo rm -rf /usr/local/aws-cli
sudo rm -rf ~/.aws/

Running which aws command will give you the following message now:

aws not found

AWS CLI has been successfully uninstalled now on MAC.