How to uninstall aws-cli

后端 未结 6 1440
无人及你
无人及你 2020-12-29 03:05

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-

相关标签:
6条回答
  • 2020-12-29 03:38

    Uninstall awscli.
    pip uninstall awscli -y

    0 讨论(0)
  • 2020-12-29 03:39

    I had the same issue, but unlike Morgan, I prefer to use Homebrew to maintain all my dependencies in a single place.

    So what I did was:

    1 - uninstall awscli (was installed with pip - python2)

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

    2 - Install awscli using homebrew

    $ brew install awscli
    

    Homebrew will install awscli inside Cellar folder: /usr/local/Cellar/awscli

    Note: I also have python3 installed through Hombrew.

    Links:

    • Amazon-awscli: Amazon Install awscli

    • Homebrew-awscli: Homebrew Install awscli

    • Homebrew-python3: Homebrew Install python3

    0 讨论(0)
  • 2020-12-29 03:41

    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
    
    0 讨论(0)
  • 2020-12-29 03:44

    On ubuntu :

    sudo apt-get remove --auto-remove awscli
    
    ln -s /home/ubuntu/.local/bin/aws /usr/bin/aws
    
    0 讨论(0)
  • 2020-12-29 03:51

    If you are using mac and used brew to install aws cli. Use brew uninstall awscli and try brew install awscli

    0 讨论(0)
  • 2020-12-29 03:55

    First try to get the path of the installation by using this command in Linux or mac

    which aws-cli
    

    After you get the installation location try removing the directory by using

    sudo rm -rf "/path resultant from previous command"
    
    0 讨论(0)
提交回复
热议问题