Conflict while updating virtualbox

5,656

I've never lost my VirtualBox guest OSs or settings when manually upgrading Oracle VirtualBox by manually uninstalling the old version and then downloading the latest version of Oracle VirtualBox and manually installing it by following the steps listed below. Your existing VirtualBox guest OS(s) will not be deleted if the version of Oracle VirtualBox is upgraded. Make sure that you also upgrade the Oracle VM VirtualBox Extension Pack so that it is the same version as whatever version of VirtualBox that is installed.

  1. Show the name of the installed virtualbox package.

    dpkg -l | grep virtualbox | grep ii 
    

    The results of this command should be something like virtualbox-5.0

  2. Uninstall the old version of VirtualBox

    sudo dpkg -r virtualbox-5.0 # match the version of virtualbox with the results of step 1.
    
  3. Download the latest version of Oracle VirtualBox for your Ubuntu release and Oracle VM VirtualBox Extension Pack from the official Oracle VirtualBox website. You might want to compare the SHA256 checksum that is provided on the download webpage to verify the integrity of the downloaded packages.

  4. Change directories using cd to the directory containing the Oracle VirtualBox .deb file that you downloaded. In your question this file is named:
    virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb

  5. Install the latest version of Oracle VirtualBox for your Ubuntu release.

    sudo dpkg -i virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb
    
Share:
5,656

Related videos on Youtube

Make42
Author by

Make42

Updated on September 18, 2022

Comments

  • Make42
    Make42 over 1 year

    I would like to update my virtualbox but get the error message

    $ sudo dpkg -i virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb 
    
    dpkg: regarding virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb containing virtualbox-5.1:
     virtualbox-5.1 conflicts with virtualbox
      virtualbox-5.0 provides virtualbox and is present and installed.
    
    dpkg: error processing archive virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb (--install):
     conflicting packages - not installing virtualbox-5.1
    Errors were encountered while processing:
     virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb
    

    I understand what it means, but are not sure how to solve the issue. Should I de-install my current installation? I am afraid I might lose my settings etc.

    • Ravexina
      Ravexina about 7 years
      Seems you have an other version of virtualbox already installed on your system. you should remove it first... by the way: I suggest you to install virtualbox from Ubuntu repositories. I don't think that you lose any settings. At least I didn't ;)
    • Make42
      Make42 about 7 years
      @Ravexina: I am using Kubuntu 14.4, so there are no updates for virtualbox anymore in the repo. My fear is that by removing the older version I lose the settings, not by updating from the repo.
    • Takkat
      Takkat about 7 years
      We have to remove a previous version (5.0) to be able to intall an upgrade (5.1). See askubuntu.com/questions/692982/…
    • Ravexina
      Ravexina about 7 years
      @Make42 I'm not sure, however I once removed mine and reinstalled the same version but everything was there ;)
    • Takkat
      Takkat about 7 years
      All settings, and all virtual machines will be preserved.
    • Admin
      Admin about 7 years
      Unless there is a very special configuration which I doubt, removing a package does not remove it's config files. That is what the purge option is for.
  • Boris Hamanov
    Boris Hamanov about 7 years
    A possibly better command to find installed virtualbox packages might be dpkg -l *virtualbox* | grep ii... as this shows all virtualbox-related packages, but only ones that are currently installed.
  • jjmerelo
    jjmerelo over 5 years
    What if it still shows conflict after doing this? There were only some configuration files.
  • Krasimir
    Krasimir over 5 years
    Thanks man all work great, +1
  • Steve
    Steve about 4 years
    If I uninstall the old version of VB, will my virtual machine(s) get deleted along with it?
  • karel
    karel about 4 years
    VirtualBox only supports images of a virtual hard disk, so you first need to create a new virtual machine in VirtualBox before using an existing VirtualBox image. See this Oracle VirtualBox tutorial: Importing a VDI in VirtualBox.