Playwright Browsers on Mac: Safe to Delete?

Medium riskAI & machine learningUpdated

Facts from the app
Location
  • ~/Library/Caches/ms-playwright
Risk level
Medium riskSafe to remove, but the tool that owns it re-downloads or rebuilds it on next use, which costs time and bandwidth. Listed, never pre-selected.
Selected by default
No — you choose whether to include it
What Freshist does
Moves the selected items to the Trash, so you can undo. Nothing is deleted outright.
In the app
Clean → Playwright Browsers — “Test browser binaries — Playwright re-downloads them on next install.”

From Freshist's own cleaning rules — the same catalog the app uses.

What Playwright downloads

Playwright doesn't drive the browsers you already have. Each Playwright version is tested against specific builds of Chromium, Firefox and WebKit, and npx playwright install downloads those builds. The Playwright docs give ~/Library/Caches/ms-playwright as the default location on macOS.

Folder names follow the pattern chromium-<revision>, chromium_headless_shell-<revision>, firefox-<revision> and webkit-<revision>, plus an ffmpeg build used for recording video. Each revision number is tied to a Playwright release.

Why it fills up

Every Playwright upgrade can bring new browser revisions. Playwright tracks which installations still use which revisions and removes ones nothing needs as you update. That bookkeeping only works for projects that still exist, though. Delete a project folder, and the browsers it installed can stay behind. A full set of three browsers plus the headless shell often adds up to over a gigabyte.

What deleting it means

What you removeResult
All browser foldersTests fail with an error that the browser executable doesn't exist, until you run npx playwright install again
Only revisions no current project usesNothing visible; current tests keep running
ffmpeg folderVideo recording stops until you reinstall

Your tests, configuration, traces and reports live in your projects, not here.

Check which browsers are installed

du -sh ~/Library/Caches/ms-playwright/*
npx playwright install --list

--list prints the browsers installed for every Playwright installation on the Mac, which helps you spot revisions no project needs.

Clean it with Playwright

The documented commands, run from a project that uses Playwright:

npx playwright uninstall         # browsers for this Playwright installation
npx playwright uninstall --all   # browsers for every Playwright installation on the Mac

To get browsers back for a project, run npx playwright install (or npx playwright install chromium for just one). CI machines that cache this folder can be cleared the same way.

You don't always need every browser. Projects that only test in Chromium can install just that one, and since recent Playwright versions run headless tests on a separate chromium_headless_shell build, a project that never opens a headed browser can install just the shell with npx playwright install --only-shell. Keeping installs targeted keeps this folder small.

If you'd rather not lose browsers that old projects use, keep the automatic cleanup on. Playwright lets you disable it with PLAYWRIGHT_SKIP_BROWSER_GC=1, so check your shell profile if old revisions never seem to go away.

What to leave in place

Browser revisions that active projects use are cheap to keep and annoying to lose before an offline test run. Leftovers from abandoned projects are what's worth removing. Packages that installed Playwright live in your project's node_modules and the package manager caches covered in the npm and pnpm guides.

Sources

Frequently asked questions

Doesn't Playwright delete old browser versions itself?

It does, as long as each Playwright installation is still around. It tracks which installs need which browser versions and removes versions nothing needs when you update. Folders from deleted projects can still linger, which is what uninstall --all cleans up.

Will deleting these browsers affect Chrome or Safari?

No. Playwright downloads its own patched browser builds into this folder. Your regular Chrome, Firefox and Safari apps, and their profiles, are separate.

How do I keep Playwright browsers somewhere else?

Set PLAYWRIGHT_BROWSERS_PATH when you install and run tests, for example to a folder inside your project or on another disk. Playwright then downloads to and looks in that folder instead.

Keep reading