Description
The Selenium cache (~/.cache/selenium) grows without bounds: I just have found and deleted 19 GB of old chrome and chromedriver versions :)
I would like to impose a limit here, and automatically prune this directory by deleting everything but the last N versions.
This limit could be opt-in, and should be evaluated/imposed whenever a new version is downloaded.
Have you considered any alternatives or workarounds?
selenium-manager --clear-cache (and --clear-metadata) exists, but that's a nuclear option similar to rm -rf ~/.cache/selenium. I do usually need the latest chrome/chromedriver version, so removing the cache directory on a regular basis means (unnecessarily re-) downloading those programs.
- manually running a
find | sort | tail -n+10 | xargs rm -rf command is tedious, error prone (at least due to version number sorting) and dangerous (I'm never comfortable with piping into rm -rf).
I'm primarily using Selenium Manager through the selenium-webdriver Rubygem. Accessing the selenium-manager binary is a bit complicated, because the binary lives somewhere in $GEM_HOME/gems/selenium-webriver-$version/bin/linux/
Description
The Selenium cache (
~/.cache/selenium) grows without bounds: I just have found and deleted 19 GB of oldchromeandchromedriverversions :)I would like to impose a limit here, and automatically prune this directory by deleting everything but the last N versions.
This limit could be opt-in, and should be evaluated/imposed whenever a new version is downloaded.
Have you considered any alternatives or workarounds?
selenium-manager --clear-cache(and--clear-metadata) exists, but that's a nuclear option similar torm -rf ~/.cache/selenium. I do usually need the latest chrome/chromedriver version, so removing the cache directory on a regular basis means (unnecessarily re-) downloading those programs.find | sort | tail -n+10 | xargs rm -rfcommand is tedious, error prone (at least due to version number sorting) and dangerous (I'm never comfortable with piping intorm -rf).I'm primarily using Selenium Manager through the
selenium-webdriverRubygem. Accessing theselenium-managerbinary is a bit complicated, because the binary lives somewhere in$GEM_HOME/gems/selenium-webriver-$version/bin/linux/