Fix Windows Search fills your hard drive with a large EDB file

Some day, you might face an unexpected behavior of Windows Search - the file where it stores indexed data, Windows.edb becomes extremely large in size. It can get as large as 50 GB and begins to occupy almost all the free space on your disk drive. The Windows.edb file is located at the folder C:\ProgramData\Microsoft\Search\Data\Applications\Windows. If you are affected by this issue, here is what you should do.

To resolve this issue, make sure you have all available updates installed. For Windows 8, make sure you have KB2836988 installed. This will prevent this issue for occuring again. But if the Windows.edb file is already several GBs in size on your disk drive, you either need to rebuild the search index after installing this update or defrag it.

To reclaim the used space and shrink your Windows.edb which is already affected by this issue, rebuild the search index as follows::

  1. Press Win + R shortcut keys together on the keyboard and type/paste the following command in the Run box:
    rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll

    This will open Indexing Options.

  2. Click Advanced.
  3. Click Rebuild on the Index Settings tab.
  4. Click OK to confirm.

Instead of rebuilding, you can also choose to defrag/compact the search index file. This can be done as follows:

  1. Change the Windows Search service so it does not automatically start while you defrag the database. To do this, run the following command in an elevated command prompt:
    Sc config wsearch start=disabled
  2. Run the following command to stop the already running Windows Search service:
    sc stop wsearch
  3. Run the following command to perform offline compaction of the Windows.edb file:
    esentutl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb
  4. Run the following command to change back the Windows Search service to delayed start for the next boot:
    sc config wsearch start=delayed-auto
  5. Run the following command to start the service:
    sc start wsearch

That's it. The bloated Windows.edb file will be shrunk in size. This issue also affects Windows Server 2012 so you can apply the fixes there too.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.