Bottom Line: It is 100% safe to delete ~/.aws/cli/cache. Deleting it clears cached AWS IAM SSO authentication tokens.
What is the AWS CLI Cache?
Located at ~/.aws/cli/cache (or %USERPROFILE%\.aws\cli\cache), AWS CLI v2 caches temporary security credentials, role assume tokens, and service JSON schemas.
Can You Delete AWS CLI Cache?
✅ Yes, safe to delete.
- Re-authenticate: You will simply be prompted to run
aws sso loginto refresh your authentication session.
How to Clear AWS CLI Cache
rm -rf ~/.aws/cli/cache/*
Discussion
Loading authentication...