63

Google Chrome saves lots of Other Search Engines from websites I visit, under Settings > Search; Manage search engines. I believe this is called ‘OpenSearch’.

Clicking the remove icon ❌ on each one would be very cumbersome.

Is there a way to delete all of them, without having to do it manually?


NB: This extension supposedly prevents Chrome from adding custom search engines.

2
  • Bloody Chrome needs to allow users select multiple entries in Settings, not just for search engines but other things like saved passwords. Everything in Settings allows only single selection, and we are supposed to repeat the action multiple times... Are the developers stupid or are they enjoying torturing the users? Aug 26, 2019 at 19:08
  • The Chrome UX for managing other search engines is not keyboard friendly. Consequently, it's a highly unproductive UX if one wishes to delete a large collection of entries. Happily, the code below suffices if one wishes to remove all entries.
    – CalvinDale
    Dec 11, 2019 at 15:36

1 Answer 1

133

Update: Works as of 8/8/21.

Go to chrome://settings/searchEngines, hit F12 and paste this into the Console tab:

for (let el of document.querySelector("body > settings-ui")
    .shadowRoot.querySelector("#main")
    .shadowRoot.querySelector("settings-basic-page")
    .shadowRoot.querySelector("#basicPage > settings-section.expanded > settings-search-page")
    .shadowRoot.querySelector("#pages > settings-subpage > settings-search-engines-page")
    .shadowRoot.querySelector("#otherEngines")
    .shadowRoot.querySelectorAll(":scope settings-search-engine-entry"))
{ el.shadowRoot.querySelector("#delete").click(); }

NOTE: If you have more than a few custom search engines, you might need to run this more than once (press the up arrow in the console, and Enter again.)

You can also access the Javascript console via Option + Command + J on OSX.

Thanks to Mahmoud K. in the comments for providing a version of this, which I automated.

23
  • 2
    What does F12 do? I have MacOS and it does nothing. Is there a menu item to achieve the same?
    – Petruza
    Mar 14, 2017 at 15:08
  • 11
    The querySelector approach does not seem to work anymore with the new material-UI. I figured out the following solution: settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList().then(function (val) { val.others.forEach(function (engine) { settings.SearchEnginesBrowserProxyImpl.prototype.removeSearchEngine(engine.modelIndex); }); });
    – alcohol
    Jun 15, 2017 at 13:31
  • 2
    This worked for me today on 7/25/2017. I did have to run it a few times.
    – weisjohn
    Jul 25, 2017 at 17:29
  • 11
    The following JS snippet clicks on the "Remove from list" of first entry in the other search engine list, you can put it in a loop and call a bunch of times: document.querySelector("body > settings-ui").shadowRoot.querySelector("#main").shadowRoot.querySelector("settings-basic-page").shadowRoot.querySelector("#basicPage > settings-section.expanded > settings-search-page").shadowRoot.querySelector("#pages > settings-subpage > settings-search-engines-page").shadowRoot.querySelector("#otherEngines").shadowRoot.querySelector("#frb0").shadowRoot.querySelector("#delete").click()
    – Mahmoud K.
    Apr 28, 2020 at 5:56
  • 4
    VM94:1 Uncaught ReferenceError: settings is not defined at <anonymous>:1:1 Aug 21, 2020 at 7:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.