How To Reduce Large Windows.edb File Size

PowerShell Folder SizePowerShell Folder Size

Key Points

  • 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:

C:\ProgramData\Microsoft\Search\Data\Applications\Windows

Note: The “ProgramData” folder is hidden by default. You must either show hidden files to access it via File Explorer, or paste the complete path in the Run Command box and press Enter.

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.

  1. Press the Windows key + i to open the Settings app.

  2. Click “Privacy & security.”

  3. Go to “Searching Windows.”

    Open the Windows Search settings page
    Open the Windows Search settings page
  4. Click “Advanced indexing options” under the Related settings section.

    Open Advanced indexing options
    Open Advanced indexing options
  5. In the Indexing options window, click Advanced.

    Click Advanced
    Click Advanced
  6. Click Rebuild.

    Rebuild Windowsedb
    Rebuild Windows.edb
  7. Click OK to confirm Windows.edb deletion.

    Confirm Windowsedb deletion
    Confirm Windowsedb deletion
  8. Back on the Indexing options window, click Modify.

    Modify indexing options
    Modify indexing options
  9. On the Indexed Locations window, uncheck “Outlook” (and any other locations you do not want to index) and click OK.

    Exclude Outlook from indexing
    Exclude Outlook from indexing
  10. 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:

  1. Press the Windows key + R to open the Run Command box.

  2. Type in “cmd” and press CTRL + Shift + Enter to launch an administrative Command Prompt.

  3. Run the following command to disable the Windows Search service from starting automatically:

    sc config wsearch start=disabled
    disable Windows Search from starting automatically
    disable Windows Search from starting automatically
  4. Now stop the Windows Search service with this command:

    net stop wsearch
    Stop the Windows Search service
    Stop the Windows Search service
  5. Now run the following command to defrag the Windows.edb file:

    esentUtl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb
  6. Now run this command to delay the Windows Search service running at startup:

    sc config wsearch start=delayed-auto
    Delay start the Windows Search service
    Delay start the Windows Search service
  7. Now run the following command to start the Windows Search service:

    net start wsearch
    Start the Windows Search service
    Start the Windows Search service

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.

Takeaway

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.

If you liked this post, Share it on:
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Talk to us now

Talk to us straight and get your questions answered right away

Tell Us About Your Project