Skip to content

feat: add AI Apps cleanup category for Ollama and LM Studio#20

Merged
momenbasel merged 3 commits intomomenbasel:mainfrom
brainx:feat/ai-apps-cleanup
Apr 14, 2026
Merged

feat: add AI Apps cleanup category for Ollama and LM Studio#20
momenbasel merged 3 commits intomomenbasel:mainfrom
brainx:feat/ai-apps-cleanup

Conversation

@brainx
Copy link
Copy Markdown

@brainx brainx commented Apr 14, 2026

Summary

Add a dedicated AI Apps cleanup category for known local AI runtimes on macOS, starting with Ollama and LM Studio.

Why

PureMac already cleans broad cache locations, but local AI apps now generate meaningful amounts of removable app-specific data.

This change makes that cleanup more explicit and safer:

  • users can inspect AI-app residue in its own category
  • app-specific cleanup paths no longer have to rely on generic cache buckets
  • primary user data is kept out of cleanup scope

Scope

Included cleanup targets:

  • ~/.ollama/logs
  • ~/Library/Caches/ollama
  • ~/Library/Caches/com.electron.ollama
  • ~/Library/WebKit/com.electron.ollama
  • ~/Library/Saved Application State/com.electron.ollama.savedState
  • ~/.lmstudio/server-logs

Explicitly excluded from cleanup:

  • ~/.ollama/models
  • ~/.lmstudio/models
  • ~/.lmstudio/conversations

Implementation

  • add a new AI Apps category to the cleanup model
  • route the category through ScanEngine
  • scan conservative Ollama and LM Studio cleanup paths only
  • reduce double-counting by excluding AI-app cache roots from the broad User Cache scan
  • keep non-AI Google app caches visible by scanning the Google vendor root instead of only Google/Chrome
  • update English and Simplified Chinese localization
  • update README feature and safety documentation

Clarification on the Google cache change

The Google cache handling is not part of the AI-app cleanup scope itself.

It is a follow-up safety adjustment to the generic User Cache deduplication logic:

  • the broad ~/Library/Caches scan now excludes vendor roots that are handled more explicitly elsewhere
  • if ~/Library/Caches/Google is excluded from that broad scan, re-adding only Google/Chrome would accidentally hide other Google app caches from scan results
  • scanning the Google vendor root keeps unrelated Google app caches visible while still preventing double-counting in the generic cache pass

Validation

  • built locally with ./script/build_and_run.sh --verify
  • confirmed the project still compiles successfully after the category and scanner changes

Notes

  • This PR intentionally does not include local helper files or Codex run-button configuration.
  • Manual verification on a machine with Ollama and LM Studio installed would still be useful before marking ready for review.

Jo X added 2 commits April 14, 2026 05:25
- add a dedicated AI Apps cleanup category
- scan conservative Ollama and LM Studio cleanup paths only
- exclude model and conversation data from cleanup scope
- reduce duplicate cache counting in User Cache
- update localized labels and README documentation
- scan the Google cache vendor root instead of only Chrome
- avoid excluding unrelated Google app caches from User Cache
- preserve the AI Apps/User Cache double-counting fix
@brainx brainx changed the title [codex] Add AI Apps cleanup category for Ollama and LM Studio feat: add AI Apps cleanup category for Ollama and LM Studio Apr 14, 2026
- document why vendor roots are re-added after broad cache exclusions
- make it clearer that the Google cache handling is a dedupe safety adjustment
@brainx brainx marked this pull request as ready for review April 14, 2026 04:13
Copy link
Copy Markdown
Owner

@momenbasel momenbasel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Well-scoped AI Apps category — conservative cleanup targets (logs/caches only), explicit model exclusions, deduplication helpers, proper double-count prevention in User Cache. One note: zh-Hant localization (PR #24) will need the new "AI Apps" key added separately.

@momenbasel
Copy link
Copy Markdown
Owner

Excellent work @brainx! The deduplication logic, path normalization, and explicit model exclusions show real attention to detail. The CleanupTarget pattern you introduced is already being referenced as a template for future categories. Thanks for the high-quality contribution!

@brainx
Copy link
Copy Markdown
Author

brainx commented Apr 14, 2026

@momenbasel Thanks for feedback and merge 👍

@brainx brainx deleted the feat/ai-apps-cleanup branch April 14, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants