65

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.

P A N
  • 1,517

1 Answers1

140

Changed to work with the new inactive shortcuts.

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

for (const 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("settings-search-engines-list[expand-list-text='Additional inactive sites']")
    .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.

Rod Boev
  • 1,545