Thursday, 23 April 2020

How to upgrade VirtualBox on Ubuntu 18.04

In one of my previous posts I demonstrated how to install VirtualBox and I installed its version 6.0. But in the mean time a new version (6.1) has been released and I want to upgrade it.


I downloaded the most recent deb package but installation failed:

~/Downloads$ sudo dpkg -i virtualbox-6.1_6.1.6-137129_Ubuntu_bionic_amd64.deb 
Selecting previously unselected package virtualbox-6.1.
dpkg: regarding virtualbox-6.1_6.1.6-137129_Ubuntu_bionic_amd64.deb containing virtualbox-6.1:
 virtualbox-6.1 conflicts with virtualbox
  virtualbox-6.0 provides virtualbox and is present and installed.

dpkg: error processing archive virtualbox-6.1_6.1.6-137129_Ubuntu_bionic_amd64.deb (--install):
 conflicting packages - not installing virtualbox-6.1
Errors were encountered while processing:
 virtualbox-6.1_6.1.6-137129_Ubuntu_bionic_amd64.deb

I checked the name of my previous installation:

~/Downloads$ dpkg -l | grep virtualbox
ii  virtualbox-6.0                                              6.0.4-128413~Ubuntu~bionic                       amd64        Oracle VM VirtualBox

...and used it to uninstall existing version:

~/Downloads$ sudo dpkg -r virtualbox-6.0 
(Reading database ... 290543 files and directories currently installed.)
Removing virtualbox-6.0 (6.0.4-128413~Ubuntu~bionic) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...

After this installation was successful:

~/Downloads$ sudo dpkg -i virtualbox-6.1_6.1.6-137129_Ubuntu_bionic_amd64.deb 
(Reading database ... 289716 files and directories currently installed.)
Preparing to unpack virtualbox-6.1_6.1.6-137129_Ubuntu_bionic_amd64.deb ...
Unpacking virtualbox-6.1 (6.1.6-137129~Ubuntu~bionic) ...
Setting up virtualbox-6.1 (6.1.6-137129~Ubuntu~bionic) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.9-2) ...

Let's check the state of packages:

$ dpkg -l | grep virtualbox
rc  virtualbox-6.0                                              6.0.4-128413~Ubuntu~bionic                       amd64        Oracle VM VirtualBox
ii  virtualbox-6.1                                              6.1.6-137129~Ubuntu~bionic                       amd64        Oracle VM VirtualBox



First letter -> desired package state ("selection state"):
  • i ... install
  • r ... remove/deinstall
  • p ... purge (remove including config files)

Second letter -> current package state:
  • i ... installed
  • c ... config-files (only the config files are installed)

ii = It should be installed and it is installed
rc = It's removed/uninstalled but it's configuration files are still there

No comments: