Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Puppeteer’s extension API rather than automating Chrome’s settings page: get the extension ID from browser.extensions(), then call browser.uninstallExtension(extensionId). The example below checks that the ID exists before removing it.

Uninstall an extension by ID

The documented Puppeteer API returns a map of extensions keyed by ID. Inspect that map to identify the extension you want, then pass its ID to uninstallExtension(). The method returns a promise that resolves when the operation completes. See the Puppeteer Chrome Extensions guide and the API reference.

const extensions = await browser.extensions();
const extensionId = 'YOUR_EXTENSION_ID';
const extension = extensions.get(extensionId);

if (!extension) {
  throw new Error(`Extension ${extensionId} was not found`);
}

console.log(`Removing ${extension.name} (${extension.version})`);
await browser.uninstallExtension(extensionId);

Replace YOUR_EXTENSION_ID with the ID in the map. The existence check prevents you from silently proceeding with an ID that does not identify an extension in Puppeteer’s returned inventory.

List extensions to find the ID

If you do not know the ID, print the map’s keys and properties before choosing which extension to remove:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const extensions = await browser.extensions();

for (const [id, extension] of extensions) {
  console.log({ id, name: extension.name, version: extension.version });
}

Use the ID associated with the intended name and version. The extension reference documents properties including name and version: Puppeteer Extension reference.

Make sure extensions are enabled for the browser session

Puppeteer’s default launch arguments disable extensions. When your task needs extensions, configure the documented enableExtensions launch option. Puppeteer’s troubleshooting guide notes that this default can also cause launch failures when Chrome policies enforce extensions; use the documented launch configuration rather than adding arbitrary flags. See Puppeteer troubleshooting and the LaunchOptions reference.

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
const browser = await puppeteer.launch({
  enableExtensions: true,
});

try {
  const extensions = await browser.extensions();
  // Find the intended ID, then call browser.uninstallExtension(id).
} finally {
  await browser.close();
}

If you are loading an unpacked extension from a directory, Puppeteer documents two approaches:

  • At launch, pass its path in enableExtensions, for example enableExtensions: [pathToExtension].
  • At runtime, launch with enableExtensions: true and call browser.installExtension(pathToExtension). That method returns the extension ID, which you can later pass to browser.uninstallExtension(id).

These are ways to enable or install an extension; they are distinct from uninstalling it. A userDataDir selects a user data directory and is not itself an uninstall operation. Refer to the Chrome Extensions guide and LaunchOptions for the documented options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why use the API instead of the Chrome extensions page?

browser.uninstallExtension(id) is the direct documented method, so the workflow does not require navigating to chrome://extensions and automating its interface. The ID-based API is also straightforward to use in a script that first enumerates extensions and chooses one by its properties.

Troubleshooting

browser.extensions or browser.uninstallExtension is unavailable

Check that you are using Puppeteer’s documented browser extension workflow and that the browser session was launched with extension support enabled. Puppeteer disables extensions by default; set enableExtensions as needed. The relevant launch behavior is described in the troubleshooting guide.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

The extension ID is not found

Inspect the entries returned by await browser.extensions() and copy the key for the intended extension. Check the displayed name and version before removing it. An ID absent from that map does not identify an extension in the inventory returned by that call.

Chrome fails to launch when extensions are involved

Puppeteer’s troubleshooting page describes a launch failure when Chrome policies enforce extensions while Puppeteer passes --disable-extensions by default. Follow the documented enableExtensions configuration for a session that needs extensions; do not treat userDataDir as a removal setting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is to capture a website rather than manage a browser extension, ScreenshotNeo is a screenshot API and MCP server. One GET request returns an image or PDF, without requiring you to set up Puppeteer for the capture.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for request options. Cookie banners, newsletter popups and chat widgets are removed before capture; bot checks, blank pages and failed loads are not billed. AI agents can take screenshots through its MCP server. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up free for 1,000 screenshots a month, with no card required.

Frequently Asked Questions

Can I remove an extension without navigating to chrome://extensions?

Yes. Puppeteer documents browser.uninstallExtension(id) as the direct API method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does the uninstall method return a result?

Its documented signature is uninstallExtension(id: string): Promise<void>; it resolves when the operation completes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.