- Windows.edb file stores information for indexed context for Windows Search, and can reach hundreds of GBs.
- The location of the Windows.edb file is “C:\ProgramData\Microsoft\Search\Data\Applications\Windows”.
- Rebuilding the Windows.edb file reduces its size, which can be done from Settings > Privacy & security > Searching Windows > Advanced indexing options > Advanced > Rebuild. Modify the indexed locations and remove Outlook.
If your Windows partition size is increasing in size unexpectedly, then you may want to check the “Windows.edb” file size, as it may be the culprit. A “.edb” file is a database file and the Windows.edb file stores the information on indexed data.
The Windows operating system indexes data, like files, folders, and emails, so that the user can search for them quickly when using the Windows Search. The information for the indexed data, such as its metadata, content, associated dates, etc., is stored in the “Windows.edb” file. After some time, this file can drastically increase in size, especially when it indexes a PST file which the email client “Outlook” uses.
Even Microsoft is aware of this issue and has (partially) addressed it in their troubleshooting guide. However, the solution provided isn’t complete. This guide provides two solutions to fix the large size of the Windows.edb file so that your OS can function normally, without lag, and free up some space.
What is the Windows.edb file?
The Windows.edb is a database file that stores the Windows Search Index information. The process that performs the indexing in the background is called “searchindexer.exe.” Anything that is indexed is stored within this file.
When you search for a file, folder, app, or email, the data is fetched from this file so that you do not have to wait for minutes for the item to appear in the search.
The Windows.edb file can be found at the following path:
Fixing the large Windows.edb file
There are two ways to reduce the size of the Windows.edb file. One is to rebuild the indexing information, but this time, reduce the items that are indexed. Usually, you skil the PST file indexing which Outlook uses. With this option, you can no longer search for your emails through Windows Search.
The other method to reduce the Windows.edb file size is to defragment the file. You can perform both of these solutions to reduce the overall file size of Windows.edb.
Rebuild Windows.edb file to reduce size
Apply the following steps to rebuild the Windows.edb database file while excluding the PST Outlook file to reduce its file size. Note that the Windows.edb file will first be deleted, and then constructed again.
Press the Windows key + i to open the Settings app.
Click “Privacy & security.”
Go to “Searching Windows.”
Click “Advanced indexing options” under the Related settings section.
In the Indexing options window, click Advanced.
Click OK to confirm Windows.edb deletion.
Back on the Indexing options window, click Modify.
On the Indexed Locations window, uncheck “Outlook” (and any other locations you do not want to index) and click OK.
Now click Close.
After performing these steps, the Windows.edb file will be deleted, and a new one will be rebuilt, without indexing the locations that you unselected. This will result in a much smaller Windows.edb file.
Reduce Windows.edb file size through defragmentation
As mentioned earlier, another method to reduce the Windows.edb file size is by defragmenting it. Here is how:
Press the Windows key + R to open the Run Command box.
Type in “cmd” and press CTRL + Shift + Enter to launch an administrative Command Prompt.
Run the following command to disable the Windows Search service from starting automatically:
sc config wsearch start=disabled
Now stop the Windows Search service with this command:
net stop wsearch
Now run the following command to defrag the Windows.edb file:
esentUtl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb
Now run this command to delay the Windows Search service running at startup:
sc config wsearch start=delayed-auto
Now run the following command to start the Windows Search service:
net start wsearch
Following these instructions should result in a smaller Windows.edb file, freeing up a significant amount of hard drive space and fixing any issues that may be resulting from low disk space.
Although it might be convenient to have all files, folders, and emails indexed and reach them with a simple search, it also has its downsides, as you already know. The Windows.edb file size expands to ridiculous amounts, even to hundreds of GBs, especially when it indexes the PST files used by Outlook.
Therefore, I suggest that you carefully select the locations and elements you want to index, preferably something you need to search often, and leaving out the rest.
With that being said, rebuilding the Windows.edb file deletes the old file and creates a new one. In case you are wondering, it is completely safe to delete the file, and will have no negative impact on the OS. It will improve its performance when the boot drive is low on storage.