| Crates.io | cleanpkgcache |
| lib.rs | cleanpkgcache |
| version | 0.2.1 |
| created_at | 2025-11-24 05:38:35.851594+00 |
| updated_at | 2025-12-17 02:48:38.928191+00 |
| description | CLI tool to clean package cache by keeping only the latest 2 versions of each package |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1947445 |
| size | 19,734 |
A Rust CLI tool to clean package cache directories by keeping only the latest 2 versions of each package.
This tool is designed to clean package cache folders where each subfolder represents a package, and each package folder contains multiple versions. The tool will identify all packages and their versions, then remove older versions while keeping only the latest 2 versions of each package.
C:\PkgCache\VC17LTCG if no path is specifiedcargo build --release
target/release/cleanpkgcache.exe# Use default path (C:\PkgCache\VC17LTCG)
cleanpkgcache.exe
# Specify a custom path
cleanpkgcache.exe "C:\Your\Custom\Cache\Path"
# Dry run - see what would be deleted without actually deleting
cleanpkgcache.exe --dry-run
# Verbose output - see detailed information about packages and versions
cleanpkgcache.exe --verbose
# Combine options
cleanpkgcache.exe --dry-run --verbose "C:\Your\Cache\Path"
# Include Roo checkpoint cleanup
cleanpkgcache.exe --clean-roo-checkpoints --dry-run
PATH - Path to the package cache directory (optional, defaults to C:\PkgCache\VC17LTCG)-d, --dry-run - Show what would be deleted without actually deleting-v, --verbose - Show detailed output about packages and versions--clean-roo-checkpoints - Also clean checkpoints under the MS Roo Code and Roo Code Extension tasks folders that are older than ~2 months-h, --help - Show help information-V, --version - Show version informationCleaning package cache at: C:\PkgCache\VC17LTCG
Package: SomePackage
Found 5 versions:
1: v1.2.3 (modified: 2023-12-01T10:00:00Z)
2: v1.2.2 (modified: 2023-11-15T14:30:00Z)
3: v1.2.1 (modified: 2023-11-01T09:15:00Z)
4: v1.2.0 (modified: 2023-10-15T16:45:00Z)
5: v1.1.9 (modified: 2023-10-01T11:20:00Z)
Keeping: v1.2.3
Keeping: v1.2.2
Deleting: C:\PkgCache\VC17LTCG\SomePackage\v1.2.1
Deleting: C:\PkgCache\VC17LTCG\SomePackage\v1.2.0
Deleting: C:\PkgCache\VC17LTCG\SomePackage\v1.1.9
Summary:
Packages processed: 1
Versions kept: 2
Versions deleted: 3
--clean-roo-checkpoints is passed, the tool also scans C:\Users\zhizha\AppData\Roaming\Code\User\globalStorage\microsoftai.ms-roo-cline\tasks and C:\Users\zhizha\AppData\Roaming\Code\User\globalStorage\rooveterinaryinc.roo-cline\tasks, deleting checkpoints folders for tasks older than roughly two monthsMIT License