Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall aws-cli

I am trying to set up an "Amazon Elastic Container Registry" but I get the following error when using this command: aws ecr get-login --no-include-email --region us-west-2:

Unknown options: --no-include-email

The manual redirects me when this occurs to go to the following page, in order to update my aws cli. https://docs.aws.amazon.com/cli/latest/userguide/installing.html

Which in short means, call pip install awscli --upgrade --user. While that works, my cli is not updated. So I removed it at all pip uninstall awscli. But I still had the aws command available, also when I opened a new session in the terminal...

So I assume I haven't installed my aws cli via pip, but I can not figure out how it does is installed. Can anyone help me out and give me some directions to resolve this issue. So I can remove the current awscli, and install a new version via pip install awscli --upgrade --user

like image 568
user007 Avatar asked Feb 01 '18 22:02

user007


People also ask

Where is AWS CLI installed?

By default, the AWS CLI version 1 installs to C:\Program Files\Amazon\AWSCLI (64-bit version) or C:\Program Files (x86)\Amazon\AWSCLI (32-bit version). To confirm the installation, use the aws --version command at a command prompt (open the Start menu and search for cmd to start a command prompt).

How do I uninstall AWS app?

In the navigation pane, find your application's name and choose Application versions. On the Application versions page, select all application versions that you want to delete. Choose Actions, and then choose Delete. Turn on Delete versions from Amazon S3.


2 Answers

I had a similar issue. Answering in case someone else does too. I think I had originally installed it without pip like this: https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html. So you just need to uninstall it like this (as instructed in above link):

$ sudo rm -rf /usr/local/aws $ sudo rm /usr/local/bin/aws 

Then you can re-install it with pip3: https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html

Basically:

pip3 install awscli --upgrade --user 

Then add it to your path

export PATH=/Users/yourname/Library/Python/3.6/bin/:$PATH 
like image 79
Morgan Avatar answered Sep 19 '22 15:09

Morgan


On ubuntu :

sudo apt-get remove --auto-remove awscli  ln -s /home/ubuntu/.local/bin/aws /usr/bin/aws 
like image 44
Amit Meena Avatar answered Sep 19 '22 15:09

Amit Meena