How to Find Where IntelliJ Stores Your Local History Data

The local history feature in IntelliJ keeps a private log of your file changes that sits completely separate from your version control system. It records edits, renames, and moves automatically as you work, and the data lives in a hidden directory inside your project. Finding that directory matters when you need to recover a deletion IntelliJ itself seems to have lost, or when you're trying to free up space on a drive that's filling up faster than expected. On Windows, the data is stored at %LOCALAPPDATA%\JetBrains\IntelliJIdea\localHistory. On macOS, it's at ~/Library/Application Support/JetBrains/IntelliJIdea/localHistory. On Linux, you'll find it under ~/.local/share/JetBrains/IntelliJIdea/localHistory. The version folder changes depending on which release you're running, so look for the most recent one if you've upgraded recently. Inside that directory is a flat collection of folders, each named with a hash, representing individual files you've edited. The structure isn't human-readable. You won't find clean diffs or summaries sitting in plain text. I've spent more time than I care to admit digging through these hash-named folders late at night after someone accidentally deleted a whole config directory and git reflog had already moved on. The local history is one of the few things that can still save you in those moments. IntelliJ keeps snapshots for about 30 days by default, and it caps the total size at roughly 100 MB across the whole project. Once either limit is hit, older snapshots get pruned without warning. This is important because people assume local history is a permanent backup. It isn't. It's a short-term safety net with aggressive garbage collection.

Here's something most people don't realize. Local history only tracks changes to files that are actually under version control or explicitly marked as belonging to the project. If you create a file outside the project root, or if you open a folder that IntelliJ doesn't recognize as part of the project, local history simply won't record anything. I ran into this once when I was working on a script stored in my home directory Downloads folder. IntelliJ opened it fine, I made several edits, deleted the wrong version by accident, and then couldn't find it anywhere. The hash folder for that file didn't exist at all. I had to rely on my OS-level file recovery tools instead. That took three hours and I got back about half the changes. If you ever need local history to track a file, make sure it lives inside the project directory. To actually view the history through the IDE, right-click any file or directory in the Project tool window, then select Local History > Show History. A timeline panel opens on the right showing each snapshot with a timestamp and a brief description of what changed. Click any entry to see the diff. You can also restore a previous version by right-clicking the snapshot and choosing Restore. This works on directories too, which is useful but easy to misuse. Restoring a directory reverts everything inside it to that point in time, not just the specific file you were thinking about. I restored a module directory once when I only wanted to recover a single resource file, and I spent the next forty minutes re-applying legitimate changes that had accumulated since that snapshot. Just be careful about the scope of what you're restoring. If you want to locate the raw data manually, open IntelliJ's About dialog by going to Help > About, then click the link that says "Show in Explorer" or "Reveal in Finder" near the configuration paths. That opens the IDE's configuration directory, and from there you navigate down into localHistory. Alternatively, you can use the built-in Find Action feature by pressing Ctrl+Shift+A (or Cmd+Shift+A on macOS), typing "Registry," and looking for the key localHistory.max.days. Changing this value adjusts how long snapshots are retained before they're deleted. The default is 30. Setting it higher means the folder grows larger and fills your drive faster. I bumped mine to 60 once when I was dealing with a messy migration project, and within two weeks the localHistory directory had grown to over 400 MB because the cap was bypassed while the retention window expanded. I had to manually delete old hash folders to get it back under control.

There's no export function for local history data. You can't back it up to another drive or share it with a teammate. It exists only inside the IDE's configuration area on the machine where you created it. If your disk fails or you reinstall your operating system without preserving that folder, those snapshots are gone. Treat local history as a convenience feature, not a strategy. Keep your actual backups in version control with regular commits, or use a proper backup solution for your project directory. The local history path I described above is useful to know because it gives you a last resort when git has moved on and your IDE is the only thing that remembers what you changed yesterday at 2 PM.

Get the Full Details

Local History | IntelliJ IDEA Documentation
Local History | IntelliJ IDEA Documentation