-1

I'm using Chromedriver in the following way:

chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--window-size=1420,1080')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument("--disable-notifications")
chrome_options.add_argument("--remote-debugging-port=9222")
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
chrome_options.add_experimental_option('useAutomationExtension', False)
chrome_options.binary_location='/usr/bin/google-chrome-stable'
chrome_driver_binary = "/usr/bin/chromedriver"
driver = webdriver.Chrome(executable_path=chrome_driver_binary, chrome_options=chrome_options)

In trying to clear some space in my ec2 instance, I'm noticing I also have the following:

-rwxr-xr-x 1 root root 197M Mar  1 20:43 /usr/lib/chromium-browser/chromium-browser

Does Chromedriver need chromium-browser as some sort of dependency, or am I OK to delete chromium-browser? It appears I only use google-chrome with Chromedriver, but again I'm not exactly sure if I need chromium-browser on the backend of things.

halfer
  • 19,824
  • 17
  • 99
  • 186
DiamondJoe12
  • 1,879
  • 7
  • 33
  • 81

2 Answers2

0

chromedriver is just interface plumbing that controls chromium-browser, which does the real work.

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30
  • So are you saying I can't delete chromium-browser, since chromedriver needs it? I always thought my chromedriver was just using google-chrome. – DiamondJoe12 Mar 16 '22 at 17:23
  • Hmm, you should do an `ls -l /usr/bin/google-chrome-stable` to see if it is large, or if it just a shell script that calls `chromium-browser`. – Tim Roberts Mar 16 '22 at 17:28
  • Here's what I get when I run that command: lrwxrwxrwx 1 root root 32 Feb 26 18:09 /usr/bin/google-chrome-stable -> /opt/google/chrome/google-chrome – DiamondJoe12 Mar 16 '22 at 17:43
  • Here's the file size: -rwxr-xr-x 1 root root 179M Feb 26 18:09 /opt/google/chrome/chrome – DiamondJoe12 Mar 16 '22 at 17:44
0

As per the documentation:

  • Chromium is an open-source and free web browser that is managed by the Chromium Project.
  • Google Chrome is a proprietary browser developed and managed by Google.

Unlike Chromium, Google Chrome offers built-in support for media codecs like MP3, H.264, and AAC, as well as Adobe Flash.


Conclusion

If your tests are not dependent on Chromium browser you can safely delete it.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Unfortunately, when I uninstalled chromium-browser, it wiped chromedriver. I have no idea why. – DiamondJoe12 Mar 17 '22 at 22:35
  • That's bizarre. I still believe you downloaded/installed them seperately. – undetected Selenium Mar 17 '22 at 22:38
  • FYI Chrome is not a proprietary browser. The full source code of Chrome is already there in the Chromium repo, it's just that Chrome specific codes are not compiled when compiling Chromium – Asesh Mar 18 '22 at 07:54