ScreenshotNeo

BlogHow-to

Puppeteer Browser Uninstall Options Explained

Learn how to inspect and clear Puppeteer’s browser cache, remove only older binaries, and prevent future downloads without affecting system Chrome.

By the ScreenshotNeo team4 October 20267 min read

To remove every browser binary managed by Puppeteer’s browser cache, inspect it with npx @puppeteer/browsers list, then run npx @puppeteer/browsers clear. This clears Puppeteer-managed browser downloads in the CLI’s cache. It does not uninstall the Puppeteer package from your project or remove a separately installed system copy of Chrome or Chromium.

Choose the right uninstall option

What you want Use Scope and caveat
See which managed browsers are installed npx @puppeteer/browsers list Lists browsers in the CLI’s cache. Check that the command is using the cache you intend.
Clear all managed browser downloads npx @puppeteer/browsers clear Clears installed browsers managed in that cache; it does not remove the project dependency.
Remove non-current browser binaries PuppeteerNode.trimCache() Removes non-current Chrome and Firefox binaries in the configured cache. It does not check whether another Puppeteer version sharing that cache needs them.
Stop future install-time downloads skipDownload or PUPPETEER_SKIP_DOWNLOAD Controls downloads during installation. Rerun the browser-install command after changing download settings.
Uninstall Puppeteer from the project Your project package manager Dependency removal is separate from browser cache cleanup.
Uninstall system Chrome or Chromium Your operating system’s package manager or application uninstall flow Puppeteer’s cache commands do not remove a separately installed system browser.

Find the cache before removing anything

Puppeteer’s default browser cache location is ~/.cache/puppeteer starting with Puppeteer v19.0.0. A project can use a different location through the cacheDirectory configuration or the PUPPETEER_CACHE_DIR environment variable. Check your project configuration and environment before cleanup, especially if multiple projects or Puppeteer versions share a cache.

npx @puppeteer/browsers list

The list command is a useful first check. If you changed the cache directory, make sure the CLI and the Puppeteer installation you care about are pointed at the intended cache; otherwise you may inspect or clear a different location.

Clear all Puppeteer-managed browser binaries

  1. Open a terminal in the project or environment whose Puppeteer cache you want to manage.
  2. List the installed browsers and confirm the cache context.
  3. Run the clear command.
  4. If your project uses a shared cache, check other projects that might rely on its browser binaries before clearing.
npx @puppeteer/browsers list
npx @puppeteer/browsers clear

The clear command is the documented broad cleanup option. It is appropriate when you intend to remove every installed browser managed in that cache. It does not uninstall the Puppeteer dependency, and it does not remove system-installed Chrome or Chromium.

Remove only older browser binaries with trimCache()

If you want Puppeteer to remove non-current Chrome and Firefox binaries from its configured cache, use the PuppeteerNode.trimCache() API. It is not a safe shared-cache garbage collector: it does not check whether another Puppeteer version using the same cache still needs a binary. Review cache sharing and the API reference for the Puppeteer version installed in your project before using it.

The API is exposed by PuppeteerNode. A minimal invocation from a project that has Puppeteer installed is:

const puppeteer = require('puppeteer');

(async () => {
  await puppeteer.trimCache();
})();

Use the package and API version already installed in your project, and consult that release’s reference for version-specific details. This operation targets non-current Chrome and Firefox binaries; it is not equivalent to clearing every managed browser.

Prevent Puppeteer from downloading browsers on future installs

If the goal is to avoid new browser downloads, configure skipDownload or set PUPPETEER_SKIP_DOWNLOAD for the installation environment. A setting change affects installation behavior; it does not remove binaries already present in the cache. The installation guide says to rerun the browser-install command after changing download configuration.

# Set for one shell command, if supported by your shell:
PUPPETEER_SKIP_DOWNLOAD=true npm install

Or configure the equivalent skipDownload option in Puppeteer’s configuration file, following the configuration guide for your installed release. Consider this only if your runtime has another browser available and configured. Skipping download can leave Puppeteer without the browser binary it normally expects.

Remove the Puppeteer dependency or a system browser

Uninstall the project dependency

Use the package manager recorded in the project. For example:

# npm
npm uninstall puppeteer

# Yarn
# Run in the project:
yarn remove puppeteer

# pnpm
pnpm remove puppeteer

These commands remove the dependency from the project according to its package manager. They are separate from npx @puppeteer/browsers clear, which manages downloaded browser binaries.

Uninstall system Chrome or Chromium

If Chrome or Chromium was installed independently through an operating-system package manager or application installer, remove it using that system’s normal uninstall process. Puppeteer’s browser cache commands apply to Puppeteer-managed downloads, not the separately installed application.

Cache location, disk usage, and shared projects

The default cache path is ~/.cache/puppeteer beginning with Puppeteer v19.0.0, but configuration and PUPPETEER_CACHE_DIR can change it. Use the same cache configuration when installing browsers and when running Puppeteer so the runtime can find the intended binary.

Puppeteer’s installation guide gives approximate browser download sizes of 170 MB on macOS, 282 MB on Linux, and 280 MB on Windows. These are download estimates, not measurements of installed disk usage. Actual space recovered depends on the files present in the cache and whether other files or projects use the same location.

Before clearing a shared cache, consider each project’s Puppeteer version and browser requirements. In particular, trimCache() does not preserve binaries merely because another version sharing the cache might need them.

Troubleshooting

Symptom Likely cause What to do
The clear command runs, but browser files remain elsewhere. You may be looking at a system browser, a different cache directory, or files outside Puppeteer’s managed cache. Check cacheDirectory and PUPPETEER_CACHE_DIR; use the operating system’s uninstall flow for a separately installed browser.
The list command does not show a browser you expected. The CLI may be pointed at a different cache, or the browser may be installed outside Puppeteer’s managed cache. Confirm the command’s environment and cache configuration, then distinguish managed downloads from system-installed browsers.
Puppeteer fails to launch after cleanup. The project no longer has the browser binary it needs, or a shared cache was cleared. Install the browser required by the project using the browser-install instructions for its Puppeteer release, or point Puppeteer to an available compatible browser.
A browser downloads again after cleanup. The project’s install configuration still allows downloads. Set skipDownload or PUPPETEER_SKIP_DOWNLOAD before installation, then rerun the browser-install command as documented.
trimCache() removes a binary another project uses. The projects share a cache, and the method does not check other Puppeteer versions’ needs. Restore the required browser for that project or give projects separate cache directories and install their required browsers there.
Uninstalling Puppeteer did not reclaim the browser download space. Removing a package and clearing the browser cache are separate operations. Inspect the managed cache and use npx @puppeteer/browsers clear if you intend to remove all its browser binaries.

Or skip the browser setup

If your task is to get a page screenshot rather than maintain a local Puppeteer browser, ScreenshotNeo provides a website screenshot API. See the API documentation for request options.

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

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);
  • Cookie banners, newsletter popups, and chat widgets are removed before the screenshot; each cleanup step can be turned off.
  • Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Response headers report the page verdict and billing status.
  • An MCP server lets AI agents, including Claude, Cursor, and other MCP clients, take screenshots.
  • The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Every feature is available on every plan.

Create a free account for 1,000 screenshots a month, with no card required.

Performance, reliability, and cost considerations

Browser cleanup is a local cache-management choice: the commands target the configured Puppeteer browser cache. Clearing binaries can recover space, but Puppeteer will need an available browser to launch afterward. If installation settings still allow downloads, a later install can download browsers again. Shared caches require care because another project may depend on binaries you remove.

The official download estimates are about 170 MB for macOS, 282 MB for Linux, and 280 MB for Windows; they describe downloads rather than guaranteed disk space recovered. For repeated screenshot work, compare the cost and maintenance of keeping browser binaries and runtime setup with using a screenshot API such as ScreenshotNeo, whose free tier provides 1,000 shots monthly and whose paid plans start at $5 for 3,000.

Frequently asked questions

Does clearing the cache uninstall Puppeteer?

No. It removes managed browser downloads in the cache. Remove the project dependency separately with its package manager.

Will npx @puppeteer/browsers clear delete my installed Chrome?

It clears Puppeteer-managed browser binaries in the CLI’s cache. A system-installed browser is managed by the operating system or its installer.

Can I keep one browser and delete the rest?

PuppeteerNode.trimCache() removes non-current Chrome and Firefox binaries in its configured cache. It does not check whether another Puppeteer version sharing that cache requires them.

Can I stop downloads without deleting existing binaries?

Yes. Configure skipDownload or PUPPETEER_SKIP_DOWNLOAD for future installation behavior. Existing cache contents are a separate cleanup operation.

Where is Puppeteer’s default browser cache?

Starting with Puppeteer v19.0.0, the documented default is ~/.cache/puppeteer. Configuration or PUPPETEER_CACHE_DIR can change it.

Official references