Windows.db Large File on Windows 11? Rebuild the Search Index
If Windows.db is a large file on Windows 11, reduce what Windows indexes and rebuild the index. This does not delete your documents, but search is incomplete while rebuilding.
What is Windows.db?
It is the database behind Windows Search. Windows 11 uses Windows.db, while Windows 10 uses Windows.edb. The usual folder is:
C:\ProgramData\Microsoft\Search\Data\Applications\Windows
Check the size
Open PowerShell as administrator. This command only reads logical file sizes; use the database file's Properties > Size on disk to check its actual disk usage:
Get-ChildItem "$env:ProgramData\Microsoft\Search\Data\Applications\Windows" -Force |
Select-Object Name, @{n='SizeGB';e={[math]::Round($_.Length/1GB,2)}}
There is no single correct size. It depends on how much content you index. Check size versus size on disk if two tools show different numbers.
Why Windows.db becomes a large file
- Many documents or emails are indexed.
- File contents are indexed, not only names.
- Large Outlook data files are included; Microsoft documents how PST files can make the Windows.edb index much larger on Windows 10, 8.1 and 8.
- Folders with constantly changing code or build output are included.
Index fewer locations first
- Open Control Panel and search for Indexing Options.
- Click Modify.
- Clear folders you rarely search, such as build output or large archives.
- Click OK.
Excluding a folder keeps its files. Windows Search may simply be slower or less complete there.
Rebuild the index
- In Indexing Options, click Advanced.
- Under Troubleshooting, click Rebuild.
- Confirm.
- Keep the PC powered on and let indexing continue.
Rebuilding can take hours on a large collection. It needs processor and disk activity. Check the file size again after indexing finishes. If you indexed the same content as before, it may grow back.
If the drive is completely full
First free a little space by moving personal files or removing items you know you do not need. Then rebuild through Indexing Options. Avoid deleting the database while the Windows Search service is running. Do not use old database compaction commands for Windows.edb on Windows 11's Windows.db.
Find other large files
A search index is only one possible cause. Windows Clean can help you compare folder sizes. You can also find large files or use the C drive full checklist.
Windows.db FAQ
Will rebuilding remove my email or documents? No. It rebuilds the search database.
Should I disable Windows Search? Usually not. Search becomes slower. Index fewer folders first.
Why can't I see the folder? ProgramData is hidden by default, and some contents need administrator permission.
Windows Clean is a free, offline disk space analyzer for Windows. No cloud, no telemetry.
Download for Windows — Free