If you're managing browser binaries separately and want to skip browser downloads, set the
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable before installation. Run this command:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install
You can also opt for a hermetic install and place binaries in a local folder. Set the
PLAYWRIGHT_BROWSERS_PATH environment variable. This command places the binaries in the specified location:
PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install
PLAYWRIGHT_BROWSERS_PATH doesn't change the installation path for Google Chrome and Microsoft Edge.
Playwright has a "stale browser removal" feature. By default, it keeps track of clients that use its browsers and deletes versions that are no longer needed. If you want to keep all installed browsers, set the
PLAYWRIGHT_SKIP_BROWSER_GC environment variable to 1.
To uninstall browsers of your current Playwright installation (chromium, firefox, webkit), run:
npx playwright uninstall
To remove browsers from other Playwright installations on your system, pass the
npx playwright uninstall --all
For the most up-to-date instructions, always refer to the official Playwright documentation.
If you still have questions, please ask a question and I will try to answer it.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email email@example.com.