Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions dev-cleaner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,17 @@ function Clear-NpmYarnPnpm {
# Manual pnpm cache cleanup
Remove-SafelyWithTracking -Path "$env:LOCALAPPDATA\pnpm\store" -Description "pnpm store"
Remove-SafelyWithTracking -Path "$env:LOCALAPPDATA\pnpm-cache" -Description "pnpm cache"

if (Get-Command bun -ErrorAction SilentlyContinue) {
Write-Item "✓" "Green" "Cleaning bun cache..."
try {
bun --cm dl 2>$null
} catch {
Write-Item "✕" "Yellow" "Could not clean bun cache"
}
} else {
Write-Item "✕" "Yellow" "bun not found. Skipping."
}
}

function Clear-NuGet {
Expand Down Expand Up @@ -562,7 +573,7 @@ function Show-Menu {
Write-Host " 4. Clear Android SDK (old build-tools)" -ForegroundColor Green
Write-Host " 5. Clear Flutter Caches " -NoNewline -ForegroundColor Green
Write-Host "(with custom directory option)" -ForegroundColor DarkGray
Write-Host " 6. Clear npm/Yarn/pnpm Caches" -ForegroundColor Green
Write-Host " 6. Clear npm/Yarn/pnpm/bun Caches" -ForegroundColor Green
Write-Host " 7. Clear NuGet Package Cache" -ForegroundColor Green
Write-Host " 8. Clear PlatformIO Caches" -ForegroundColor Green
Write-Host "─── IDEs & Editors ───" -ForegroundColor DarkGray
Expand Down Expand Up @@ -649,7 +660,7 @@ function Start-MainLoop {
}
}
"6" {
Write-SectionHeader "Performing npm/Yarn/pnpm Cleanup"
Write-SectionHeader "Performing npm/Yarn/pnpm/bun Cleanup"
Clear-NpmYarnPnpm
}
"7" {
Expand Down
10 changes: 8 additions & 2 deletions dev-cleaner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ cleanup_npm_yarn() {
else
print_item "✕" "${YELLOW}" "pnpm not found. Skipping."
fi
if command -v bun &> /dev/null; then
print_item "✓" "${GREEN}" "Cleaning bun cache..."
bun --cm dl
else
print_item "✕" "${YELLOW}" "bun not found. Skipping."
fi
}

cleanup_homebrew() {
Expand Down Expand Up @@ -544,7 +550,7 @@ display_menu() {
echo -e "${GREEN} 2.${NC} Clear Xcode Caches & DerivedData"
echo -e "${GREEN} 3.${NC} Clear Android/Gradle Caches"
echo -e "${GREEN} 4.${NC} Clear Flutter Caches ${FAINT}(with custom directory option)${NC}"
echo -e "${GREEN} 5.${NC} Clear npm/Yarn/pnpm Caches"
echo -e "${GREEN} 5.${NC} Clear npm/Yarn/pnpm/bun Caches"
echo -e "${GREEN} 6.${NC} Clean Homebrew Caches"
echo -e "${GREEN} 7.${NC} Clear CocoaPods Caches"
echo -e "${GREEN} 8.${NC} Clear IDE (JetBrains, VSCode) Caches"
Expand Down Expand Up @@ -679,7 +685,7 @@ main_loop() {
fi
;;
5)
print_section_header "Performing npm/Yarn/pnpm Cleanup"
print_section_header "Performing npm/Yarn/pnpm/bun Cleanup"
cleanup_npm_yarn
;;
6)
Expand Down