0

I'm (currently) running Ubuntu 20.04. Looking at the Virtual Box release cadence it appears that a new release comes out each month. When I start Virtual Box it reminds me that a new release is available.

When I research how to upgrade Virtual Box it appears that I need to uninstall the old one and then install the new one. While this is understandable from a conceptual perspective it seems to be more work than one could consider reasonable to stay on the latest updates.

Is there an easy way to keep Virtual Box up-to-date or someway include the updates as part of the regular system updates?

Bonus answer material: I think that it would be helpful for everyone if someone could explain how a product like VSCode is distributed such that it is automatically updated as part of system updates and something like Virtual Box is not.

Guy
  • 144
  • 1
  • 17
  • 1
    Did you install VirtualBox using apt or the Software Center? Because all you need to do is not neglect regular updates. See also: https://askubuntu.com/questions/343333/whats-the-difference-between-a-ppa-and-a-repository and https://askubuntu.com/questions/307280/how-do-i-install-applications-in-ubuntu – Nmath Sep 18 '20 at 14:01
  • Debian solved the endless-new-updates treadmill 20 years ago by inventing the current distro format (snapshot repositories, packages, and supporting infrastructure) that Ubuntu uses. VirtualBox 5.1 in Ubuntu 16.04 works very well and is safe to use...as is Virtualbox 6.1 in Ubuntu 20.04. Constant upgrades to upstream software is a choice you make; it is not required. Choose a distro and maintenance routine that you are comfortable with. If you choose to stick with Ubuntu, then simply don't fight Ubuntu's update cadence and you will likely be just fine. – user535733 Sep 18 '20 at 14:28
  • If you do as suggested in the answer below https://askubuntu.com/a/1276082/243321 you'll get updates through the normal apt system. There is no need to uninstall the old version if you do it this way. – Organic Marble Sep 18 '20 at 17:57

1 Answers1

2

Virtualbox has Ubuntu-friendly repositories available as described on their website. To repeat their directions (focusing on Focal):

Add the following line to your /etc/apt/sources.list:

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib

The Oracle public key for apt-secure can be downloaded and added with:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

To install VirtualBox, do

sudo apt-get update
sudo apt-get install virtualbox-6.1

This will now be updated along with your normal system updates.

Brian Turek
  • 1,826
  • Part of those instructions include adding a line to "/etc/apt/sources.list" - in doing that and substituting "focal" for "" I get "Failed to download repository information" from the Software Updater. Removing that lines reverts Software Updater to functioning again. – Guy Sep 19 '20 at 17:08
  • 1
    Did you do the second step of adding the GPG key? – Brian Turek Sep 19 '20 at 17:18
  • I messed up. I looked through my history and I had only added one of the GPG keys. After adding the second the updates are now working. Thanks @BrianTurek. – Guy Sep 21 '20 at 04:13