System Maintenance Scripts
This directory contains scripts for various system maintenance tasks, primarily focused on package manager cache cleanup and AWS CLI updates.
Available Scripts
Package Manager Cache Cleanup
Script: clear-package-caches.sh
This script cleans the caches for multiple package managers:
- npm: Clears the npm cache using
npm cache clean --force
- apt: Cleans the apt cache using
sudo apt-get clean
- NuGet: Clears NuGet caches using either
nuget locals all -clear
ordotnet nuget locals all --clear
- pip: Purges the pip cache using
pip cache purge
orpip3 cache purge
The script checks for the presence of each package manager before attempting to clear its cache, so it's safe to run even if some package managers aren't installed.
Usage:
./clear-package-caches.sh
AWS CLI Update Scripts
AWS CLI Version 2 Update
Script: update-aws-cli-v2.sh
Updates AWS CLI version 2 (recommended version) by:
- Downloading the latest installer from AWS
- Extracting and running the update process
- Cleaning…