aws / aws/aws-cli

V2 Update leaves old versions behind

Open
#5,979 2 comments 12 reactions 1 assignee Claimed by @RyanFitzSimmonsAK View on GitHub
enhancement feature-request installation p2
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x] I've gone though the [User Guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) and the [API reference](https://docs.aws.amazon.com/cli/latest/reference/)
- [x] I've searched for [previous similar issues](https://github.com/aws/aws-cli/issues) and didn't find any solution

**Describe the bug**
When I update the aws-cli v2 on linux, using the instructions [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-upgrade), it doesn't remove old versions of the awscli. So after several updates I end up with gigabytes of space used by old versions of aws-cli.

**Platform/OS/Hardware/Device**
Linux

**To Reproduce (observed behavior)**
Follow instructions at https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-upgrade to upgrade aws-cli to a new version. Then inspect the folder where the aws-cli is installed, and see old versions still there.

**Expected behavior**
Upgrading aws-cli shouldn't leave behind old versions.

Or better yet, provide ways to install aws-cli v2 using actual package managers like apt, dnf, maybe PyPi (see #4947) that handles cleaning up old files on upgrade.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.