Safe cleanup guide

How to Clean AI Coding Tool Caches on Mac Safely

A review-first method for cleaning Cursor, Claude Code, Codex, Windsurf, Cline, and other AI development tool caches without guessing.

Reviewed 4 August 2026 · macOS 13 or later · Apple silicon and Intel

Start with a scan, not a deletion list

Generic lists of Library paths age quickly and cannot tell whether a tool is running, installed, or using a folder for recoverable state. Begin by measuring the data and classifying it as cache, log, backup, workspace state, application data, or project output.

The goal is to recover meaningful space with the smallest reversible action. A 50 MB cache does not deserve the same attention as a multi-gigabyte orphaned editor root or duplicated dependency tree.

Close active tools and preserve recoverability

  • Quit the AI editor, agent, and related preview or build processes
  • Commit or back up project work before maintenance
  • Use Trash-first removal when possible instead of immediate permanent deletion
  • Do not treat prompts, sessions, workspace databases, or configuration as disposable caches
  • Reopen the tool and verify the workflow before emptying Trash

Clean re-creatable data first

Caches and ordinary logs are usually the least risky starting point because the tool can regenerate them. Project dependencies and build output can also be re-created, but removing them may cost download time and a lengthy rebuild, so review them at the project level.

Application Support and workspace-state folders require more caution. They can contain extensions, local databases, settings, or recoverable session state even when part of the folder looks temporary.

Reserve full cleanup for orphaned tools

A deeper cleanup makes sense when a supported editor has been uninstalled and its known data roots remain. Verify both installation state and running processes, restrict the action to exact known roots, and require a separate confirmation.

DiskTidy applies those safeguards in Full Clean and keeps project directories outside automatic cleanup.

Frequently asked questions

Is it safe to delete every cache folder on a Mac?

No. Many caches are re-creatable, but a folder name alone is not enough evidence. Close the related app, review the exact path and category, keep backups, and avoid deleting workspace or project data as if it were a cache.

Should I delete AI editor data while the editor is running?

No. Active tools may be writing databases, logs, or state. Close the tool first and use a cleanup process that re-checks whether it is active.

Free scan

See what is actually using your Mac.

Scan first. Review every finding. Upgrade only when you want DiskTidy to clean.

Download DiskTidy