Windows
Is it safe to delete the Windows.edb file?
Yes, but don't delete it by hand. Windows.edb is the Windows Search index. Rebuild it from Indexing Options, and index fewer locations to keep it small.
Updated 6 October 2026
Yes, it's safe to get rid of Windows.edb, but don't delete it by hand. It's the Windows Search index, and Windows keeps it open while it runs. The safe way is to rebuild the index from Indexing Options, which deletes the old file and starts a new, usually much smaller one. If it grew because Windows indexes too much, it will grow again unless you change what's indexed.
Quick verdict:
- Safe: rebuilding the index from Indexing Options → Advanced → Rebuild. Your files are never touched.
- Works, but more hassle: stopping the Windows Search service and deleting the file manually.
- Not a lasting fix on its own: if Outlook or a huge folder is indexed, the file grows back. Exclude it.
What is Windows.edb?
Windows Search keeps an index of your files, their properties and, for many file types, their contents. That's what makes typing in the Start menu or the File Explorer search box fast. The index is stored here:
C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb
On Windows 10 it's a single Windows.edb database. On Windows 11, Microsoft moved the index to SQLite, so you'll usually find Windows.db and Windows-gather.db in the same folder instead. Same purpose, same advice.
Why does it get so big?
Microsoft's guide to search indexing in Windows gives a rule of thumb: the index is usually less than 10 percent of the size of the files it indexes. It also notes that lots of small files and code files can push that percentage up. In practice, the usual causes of a huge index are:
- Outlook. Email in
.pstand.ostfiles is indexed message by message, so a big mailbox means a big index. - Enhanced mode, which indexes your whole PC instead of just your user folders.
- Folders full of small files: source code,
node_modules, game mods, photo libraries with sidecar files. - An old index that has been growing and shrinking for years without being rebuilt.
How much space does it use?
PowerShell (run as administrator) shows the size of everything in the index folder:
(Get-ChildItem "$env:ProgramData\Microsoft\Search\Data\Applications\Windows" -Recurse -File | Measure-Object Length -Sum).Sum / 1GB
File Explorer: paste C:\ProgramData\Microsoft\Search\Data\Applications\Windows into the address bar. If Windows says you don't have permission, click Continue and approve the prompt.
With SquirrelDisk: scan your C: drive and follow ProgramData → Microsoft → Search in the chart. If the index is what's filling your disk, it stands out as a thick slice. SquirrelDisk runs without admin rights, so if your account can't read the folder it may show smaller than it is; the PowerShell command above gives the exact number. SquirrelDisk never deletes anything inside C:\ProgramData\Microsoft, so for the actual cleanup, use the steps below.
How to delete it safely
Rebuild the index (recommended)
- Open Start, type Indexing Options, and open it. On Windows 11 you can also get there from Settings → Privacy & security → Search (called Searching Windows on older versions), then Advanced indexing options.
- Click Advanced. Approve the administrator prompt.
- On the Index Settings tab, under Troubleshooting, click Rebuild, then OK.
Windows deletes the old index and starts again. Indexing runs in the background and can take a while, from minutes to a few hours depending on how many files you have. Search results are incomplete until it finishes.
Before rebuilding, it's worth trimming what's indexed (see below), so the new index starts small.
Delete the file manually
Only if the rebuild doesn't work, for example because the index is corrupted. Open Command Prompt as administrator and run:
net stop "Windows Search"
del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb"
net start "Windows Search"
On Windows 11, delete Windows.db and Windows-gather.db instead. If the service restarts too quickly to let you delete the file, set it to Disabled in the Services app (services.msc) first, delete the file, then set it back to Automatic (Delayed Start) and start it.
What you should not delete
- Don't delete the whole
Searchfolder or other files underC:\ProgramData\Microsoft. Other parts of Windows keep data there. - Don't leave Windows Search disabled unless you really don't use search. Start menu search, File Explorer search, Outlook search and some apps depend on it.
- Don't expect a rebuild alone to last if you index a 50 GB mailbox. Change the scope instead.
If search misbehaves after you've deleted the file manually, run the Rebuild steps above, or try the Search and Indexing troubleshooter in Settings → System → Troubleshoot → Other troubleshooters if your version of Windows still has it.
How to stop it growing back
Index less. In Indexing Options, click Modify and untick folders you never search. On Windows 11 you can also go to Settings → Privacy & security → Search and switch from Enhanced to Classic, which indexes only your libraries and desktop, or add folders under Exclude folders from enhanced search.
Exclude Outlook if you use its own search differently. In Indexing Options → Modify, untick Microsoft Outlook. Outlook search will be slower, so only do this if you rarely search mail on this PC, or if your mailbox lives online (Outlook on the web searches on the server).
Move the index. In Indexing Options → Advanced, under Index location, click Select new and choose a folder on another drive. Windows moves the index after the Windows Search service restarts. Useful if your C: drive is small and you have a second internal drive.
Turn off content indexing for big file types. On the File Types tab of the Advanced dialog, you can set file types to Index Properties Only, so Windows doesn't index the full text of, say, log files.
For other system folders that grow large, see is it safe to delete the SoftwareDistribution folder and ETL files.
Questions
What happens if I delete Windows.edb?
Windows Search loses its index and builds a new one from scratch. Your files aren't touched. Until indexing finishes, searches in Start, File Explorer and Outlook are slower and may miss results.
Why is Windows.edb so huge?
Usually because Windows is indexing a lot: a large Outlook mailbox, Enhanced mode on a full drive, a folder full of small files, or an index that grew over the years. Rebuilding it and indexing fewer places normally brings it back down.
Why can't I delete Windows.edb?
Because the Windows Search service has it open. Use Indexing Options → Advanced → Rebuild instead, which deletes and recreates it safely.
I can't find Windows.edb on Windows 11. Where is it?
On Windows 11 the index usually lives in SQLite files called Windows.db and Windows-gather.db, in the same folder: C:\ProgramData\Microsoft\Search\Data\Applications\Windows. The advice in this guide applies to them too.
Can I turn off Windows Search indexing?
Yes, by disabling the Windows Search service, but Start menu, File Explorer and Outlook searches become much slower. Excluding big folders is usually a better trade.
Try SquirrelDisk
Free and open source, for macOS, Windows and Linux.
v2.5.0 · macOS · Windows · Linux