WindowsmacOSLinux

Where Does Puppeteer Store Its Browsers?

Puppeteer browser cache on Linux, macOS and Windows, the env var that moves it, and pruning old Chrome builds.

Last updated

Puppeteer downloads its own Chrome builds into a cache folder outside your project, one versioned subfolder per browser release. That keeps installs hermetic and node_modules small, at the cost of gigabytes accumulating silently across upgrades.

The location follows OS cache conventions and moves with one environment variable. CI machines usually pin that variable to a cached directory, since redownloading Chrome on every run wastes minutes. Old version folders stay behind after upgrades, so pruning them is the usual disk space win.

Where Puppeteer stores this, by platform

Windows
%userprofile%\.cache\puppeteer

Default resolves under the user profile unless PUPPETEER_CACHE_DIR overrides it. Each Chrome version gets its own subfolder. That variable is authoritative when set, so check it first on build agents.

macOS
~/Library/Caches/puppeteer

Same versioned layout as other platforms. Cache cleaners sometimes flag it, so exclude the path if cleaners break your test runs.

Linux
~/.cache/puppeteer

Follows the XDG cache home. Chrome and chrome-headless-shell builds sit side by side here. Point PUPPETEER_CACHE_DIR at shared storage on CI to skip downloads.

Frequently asked questions

How do I change where Puppeteer stores browsers?

Set the PUPPETEER_CACHE_DIR environment variable before installing. Puppeteer uses that directory for all browser downloads from then on, on every OS.

Why is the Puppeteer cache so big?

Each Puppeteer version pins its own Chrome build, and old ones stay behind after upgrades. Delete the subfolders for versions you no longer test against to reclaim the space.

Notice an outdated path? Let us know.