What Is the ~/.trae Folder, and Is It Safe to Delete?
~/.traeYes, you can delete ~/.trae, but know what goes with it. The folder holds caches and local state for Trae, the AI code editor from ByteDance. Caches rebuild on their own and settings re-sync when you sign back in, but locally installed extensions and any preferences that never synced are gone for good. If you stopped using Trae entirely, deleting the folder is a clean win.
What it is
Trae is ByteDance's AI code editor, built on the same open source foundation as VS Code. Like most editors in that family, it creates a hidden dot folder in your home directory the first time it runs. That folder, ~/.trae, is where the editor keeps caches, working state, and extension data that it wants outside the app bundle. You won't normally see it in Finder, because macOS hides anything whose name starts with a period.
It grows the usual way for an editor folder: extensions you install land here, and the app writes caches and state as you work. On a light setup it stays small, often well under a gigabyte, but a long list of extensions and daily use push it up. It also outlives the app. Dragging Trae to the Trash does not remove ~/.trae, which is why people find the folder months after they last opened the editor and wonder what put it there.
Is it safe to delete?
This is a caution case, not a free pass. If you still use Trae, deleting ~/.trae wipes its local caches and state. The caches rebuild automatically and your settings re-sync the next time you sign in, but extensions usually need to be reinstalled, and anything that only ever lived locally does not come back. Expect the first launch afterward to be slower while the editor rebuilds everything.
If you have moved on from Trae, the math is simple: the folder is dead weight and nothing else on your Mac depends on it. Delete it along with the app. Diskmack spots ~/.trae automatically and cleans it the safe way, so you don't have to go digging through hidden folders yourself.
How to check its size
In Finder: In Finder, press Command-Shift-G (or choose Go > Go to Folder), type ~/.trae and press Return. Go to Folder opens hidden folders without complaint. Press Command-A to select everything inside, then Command-Option-I to open the Inspector and read the combined size. To toggle hidden items in your home folder generally, press Command-Shift-Period.
In Terminal:
du -sh ~/.trae
du -sh ~/.trae/*How to clean it
- If you have an account, open Trae and make sure you're signed in, so your settings and extension list are synced before you remove anything local.
- Quit Trae completely (Trae > Quit Trae, or press Command-Q). Deleting state files while the app is running invites weirdness.
- In Finder, press Command-Shift-G, type ~/.trae and press Return.
- Drag the .trae folder to the Trash. If you'd rather keep your extensions installed, open the folder first and move only the cache subfolders instead of the whole thing.
- Relaunch Trae. It recreates ~/.trae and rebuilds its caches on the next start, so don't be surprised if the first launch takes longer than usual.
- If you've uninstalled Trae for good, skip the relaunch and also check ~/Library/Application Support/Trae for leftover data while you're at it.
Trae keeps a second, often larger stash under ~/Library/Application Support/Trae. If you're reclaiming space after uninstalling, remove both locations, not just the dot folder.
Will it come back?
Yes, as long as Trae is still installed and you keep using it. The editor recreates ~/.trae on launch, caches rebuild as you work, and settings re-sync when you sign in, so the folder drifts back toward its old size over weeks of normal use. That's expected behavior, not a bug, and there's no setting to stop it. If you deleted the app itself, the folder stays gone.
Common questions
Will deleting ~/.trae remove the Trae app?
No. The app itself lives in /Applications. The ~/.trae folder only holds caches, state, and extension data, so the app still launches after you delete it. It just starts fresh and rebuilds what it needs.
I uninstalled Trae months ago. Why is the folder still there?
Dragging an app to the Trash on macOS leaves its support files behind, and ~/.trae is one of them. If Trae is gone from /Applications, the folder is safe to delete. Check ~/Library/Application Support/Trae too, since that's usually the bigger leftover.
Will I lose my code or projects?
No. Your project files live wherever you saved them, not inside ~/.trae. What's at risk is local editor state: extensions, caches, and any settings that never synced to your account. That's why this folder rates a caution rather than a blanket yes.
How big does ~/.trae usually get?
Modest compared with heavyweights like node_modules or Xcode's caches. Often a few hundred megabytes, more if you've installed a lot of extensions. Check the size first; if it's tiny, deleting it may not be worth the rebuild.
Related folders
- What is the .cursor folder on your Mac, and is it safe to delete?
- What is the .antigravity folder, and is it safe to delete?
- What Is the .codeium Folder on Mac, and Is It Safe to Delete?
- Is the VS Code Extensions Folder Safe to Delete on Your Mac?
- Is the VS Code Cache Folder Safe to Delete on Mac?
- What is the .gemini folder on your Mac, and is it safe to delete?