I built a zsh cleanup script for macOS dev machines — and learned more than I expected
Mili Cardenas developed a zsh cleanup script for macOS development machines to help manage accumulated junk files. The script, named clean-mac, targets 18 categories of development waste and includes a dry-run mode to preview deletions. Throughout the process, Cardenas encountered various bugs related to zsh syntax and behavior that provided valuable learning experiences.
- ▪The clean-mac script cleans up to 18 categories of development waste on macOS.
- ▪It includes a dry-run mode that allows users to see what would be deleted before executing the cleanup.
- ▪Cardenas faced challenges with zsh syntax, such as array indexing and glob errors, which led to important fixes.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1621279) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Mili Cardenas Posted on May 27 I built a zsh cleanup script for macOS dev machines — and learned more than I expected #devtools #shell #productivity #mobile If you do iOS and Android development on a Mac, your disk is quietly dying.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).