October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Uninstall a Chrome Extension with Puppeteer

Use Puppeteer’s extension map to identify the right ID, then uninstall it directly without automating chrome://extensions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Puppeteer’s browser.extensions() method to find an extension’s ID, then pass that ID to browser.uninstallExtension(). You do not need to automate chrome://extensions. Extensions must be enabled in the browser launch configuration for Puppeteer to work with them.

Uninstall an extension by ID

Puppeteer returns installed extensions as a map. Inspect its entries to identify the extension you want to remove, then call browser.uninstallExtension(id). The method accepts a string ID and returns a promise that resolves when the operation completes.

As an Amazon Associate I earn from qualifying purchases.

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

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

console.log(extension.name, extension.version);
await browser.uninstallExtension(extensionId);

The existence check prevents passing an ID that is not present in Puppeteer’s returned inventory. The official Puppeteer Chrome Extensions guide documents this direct removal method.

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

Complete example for an unpacked extension

For an extension stored in an unpacked local directory, provide its path through the enableExtensions launch option. This example loads that extension, reports its ID and version, and uninstalls it from the launched browser instance. Save it as an ES module, such as uninstall-extension.mjs, and replace the directory path with the location of your extension.

import puppeteer from 'puppeteer';

const extensionPath = '/absolute/path/to/unpacked-extension';
let browser;

try {
  browser = await puppeteer.launch({
    headless: false,
    enableExtensions: [extensionPath],
  });

  const extensions = await browser.extensions();

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

  const targetId = process.env.EXTENSION_ID;
  if (!targetId) {
    throw new Error('Set EXTENSION_ID to the ID of the extension to uninstall.');
  }

  const target = extensions.get(targetId);
  if (!target) {
    throw new Error(`Extension ${targetId} was not found in the browser.`);
  }

  console.log(`Uninstalling ${target.name} (${target.version})`);
  await browser.uninstallExtension(targetId);
  console.log('Uninstall operation completed.');
} finally {
  if (browser) {
    await browser.close();
  }
}

Run it with an ID copied from the printed inventory, for example by setting EXTENSION_ID in your shell before launching the script. The script deliberately does not guess which extension to remove; selecting by a known ID is safer than relying on a name that may not be unique.

Find the extension ID

Call browser.extensions() and inspect the map’s keys and values. Each key is an ID; the extension object includes properties such as name and version. Match the properties to the intended extension, then use the corresponding key as the argument to uninstallExtension.

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 extensions = await browser.extensions();

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

Enable extensions in Puppeteer

Puppeteer’s default launch arguments disable extensions. The documented enableExtensions launch option prevents default arguments that would stop extensions from being enabled. For unpacked extensions, set it to an array of extension directory paths, as in the complete example above.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

You can also launch with enableExtensions: true and install an unpacked extension at runtime with browser.installExtension(pathToExtension). That method returns the extension ID; keep installation and removal as separate operations:

const browser = await puppeteer.launch({ enableExtensions: true });
const extensionId = await browser.installExtension('/absolute/path/to/unpacked-extension');
await browser.uninstallExtension(extensionId);

See Puppeteer’s LaunchOptions reference for the launch option and troubleshooting guide for the default extension-disable behavior and its documented workaround when Chrome policies enforce extensions.

Troubleshoot common problems

  • The extension does not appear in browser.extensions(): Check that the browser was launched with enableExtensions configured for the extension workflow. Puppeteer disables extensions by default.
  • The launch fails when extension policies are active: Puppeteer’s troubleshooting guidance says its default --disable-extensions argument can cause launch failure when such policies are enforced. Use the documented enableExtensions option rather than adding arbitrary command-line flags.
  • The target lookup returns no extension: Confirm the ID against the keys printed from the current browser’s extension map. The removal call needs the extension ID, not its display name or directory path.
  • You expected userDataDir to remove an extension: userDataDir specifies a user data directory; it is not an uninstall operation. Use browser.uninstallExtension(id) for removal.
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 separate screenshot API and MCP server. It can return a screenshot or PDF from one GET request; it does not uninstall Chrome extensions.

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

For example, capture a page with cURL (see the ScreenshotNeo API documentation for options):

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie banners are accepted before capture, and known consent platforms, newsletter popups and chat widgets are removed; each of those steps can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed; response headers identify the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info and capture_pdf tools for AI agents and MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.