Install or update the AWS CLI
*Linux x86 (64-bit):
1 2 3 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
1 2 3 curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
Uninstall the AWS CLI
- Locate the symlink and install paths. Use the
whichcommand to find the symlink.
1 2 which aws /usr/local/bin/aws
ls command to find the directory that the symlink points to.
1 2 ls -l /usr/local/bin/aws lrwxrwxrwx 1 ec2-user ec2-user 49 Oct 22 09:49 /usr/local/bin/aws -> /usr/local/aws-cli/v2/current/bin/aws
- Delete the two symlinks
1 2 sudo rm /usr/local/bin/aws sudo rm /usr/local/bin/aws_completer
- Delete the install directory.
1 sudo rm -rf /usr/local/aws-cli
- (Optional) Remove the shared AWS SDK and AWS CLI settings information in the .aws folder.
1 sudo rm -rf ~/.aws/