Remove virtualbox from linux

How to Completely Remove Virtualbox From Linux?

The “Oracle VirtualBox” is a powerful open-source virtualization tool. It is mainly designed for running multiple operating systems, like Linux, Mac OS, Microsoft Windows, and Oracle Solaris, at the same time. Sometimes it needs to be uninstalled due to its improper working, outdated version, and not being used in the future. Like its installation, the removal/deletion process is easy and straightforward.

This post provides a complete procedure to completely remove the VirtualBox from Linux.

How to Completely Remove Virtualbox From Linux?

The “VirtualBox” can be easily removed from the majorly used Linux distribution using their default package managers. Follow the essential steps to perform this operation.

Step 1: Check the VirtualBox Version (Optional)

First, check out the Virtualbox installed version by specifying the application package name as “vboxmange” name with the “version” flag:

The Virtualbox installed version is “6.1.38”.

Step 2: Uninstall Virtual Box

Use the default package manager alongside the “–remove” and “–purge” flags to completely remove the “VirtualBox” tool.

The “–remove” flag will remove the installation files, and the “–purge” will uninstall the configuration files. The “purge” flag is not used in Fedora/CentOS/RHEL because its “remove” flag completely deletes all the files of the package:

$ sudo dnf remove virtualbox #For CentOS/RHEL $ sudo dnf remove virtualbox #For Fedora $ sudo apt --purge remove virtualbox #For Ubuntu/Debian-Based

The highlighted section confirms that all the installation and configuration files of Virtualbox have been removed.

Step 3: Remove VirtualBox Dependencies

When an application is installed in the Linux system, additional dependencies are installed. Execute the “autoremove” command to remove the additional dependencies of Virtualbox:

$ sudo yum autoremove virtualbox #For CentOS/RHEL $ sudo apt autoremove virtualbox #For Ubuntu/Debian-Based $ sudo dnf autoremove virtualbox #For Fedora

The Virtualbox dependencies have also been removed completely.

Step 3: Delete All Virtual Machines

The Virtualbox contains the virtual machine occupying a specific size in the virtual hard drives. By default, the virtual machines of VirtualBox are created in the “Home” directory, while it can be different in your case. So, use the path of the virtual machines as per your system.

To delete these files and settings, run the “rm(remove)” command with the combination of “R(recursively) and “f(forcefully)” flags in this way:

$ sudo rm ~/"VirtualBox VMs" -Rf $ sudo rm ~/.config/VirtualBox/ -Rf

The first command deletes the virtual machine’s files, and the second removes their setting from the virtual hard drive.

Читайте также:  Change file size linux

Step 4: Verify the VirtualBox

Verify the “VirtualBox” uninstallation process by again executing the “version” command on the terminal:

It is verified that “VirtualBox” has been completely removed from the Linux system.

Conclusion

In Linux, use the default package managers of Linux distribution, i.e., “apt(Ubuntu/Debian)” and “dnf(Fedora/CentOS/RHEl)” to completely remove the Virtualbox. The Virtualbox package also contains the virtual machine files and settings that can be quickly removed utilizing the “rm(remove)” command.

This post has provided the complete procedure to remove the Virtualbox from Linux completely.

Источник

How to Uninstall the VirtualBox 7

In this article, we will show you how to uninstall the VirtualBox 7 from the following operating systems:

  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS
  • Debian 10
  • Debian 11
  • LinuxMint 20
  • LinuxMint 21
  • CentOS 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Fedora 35
  • Fedora 36
  • Windows 10
  • Windows 11

Table of Contents:

How to Uninstall VirtualBox 7 from Ubuntu/LinuxMint/Debian

If you installed the VirtualBox 7 on Ubuntu 22.04 LTS, LinuxMint 21, Debian 11, or any other Ubuntu/Debian-based Linux distributions and would like to uninstall it, this section is for you.

To uninstall the VirtualBox 7 from Ubuntu 22.04 LTS, LinuxMint 21, Debian 11, or any other Ubuntu/Debian-based Linux distributions, run the following command:

To confirm the action, press Y and then press .

VirtualBox 7 is being uninstalled. It takes a few seconds to complete.

VirtualBox 7 should be uninstalled at this point.

To remove the VirtualBox 7 dependencies, run the following command:

To confirm the action, press Y and then press .

VirtualBox 7 dependencies are being removed. It may take a few seconds to complete.

VirtualBox 7 dependencies should be removed.

For the changes to take effect, reboot your computer with the following command:

How to Uninstall VirtualBox 7 from CentOS/RHEL/Fedora

If you installed the VirtualBox 7 on CentOS, RHEL 8/9, Fedora 35/36, or any other RPM-based Linux distributions and would like to uninstall it, this section is for you.

To uninstall the VirtualBox 7 from CentOS, RHEL 8/9, Fedora 35/36, or any other RPM-based Linux distributions, run the following command:

To confirm the action, press Y and then press .

VirtualBox 7 should be uninstalled.

For the changes to take effect, reboot your computer with the following command:

How to Uninstall VirtualBox 7 from Windows 10

If you want to uninstall the VirtualBox 7 from Windows 10, right-click (RMB) on the start menu and click on Settings.

The Settings app should be opened.

Click on Apps.

Search with the virtualbox [1] keyword. VirtualBox 7 should be listed as an installed software. To uninstall it, click on Uninstall [2] .

Click on Uninstall.

Click on Yes.

VirtualBox 7 is being uninstalled. It takes a few seconds to complete.

VirtualBox 7 should be uninstalled at this point.

How to Uninstall VirtualBox 7 from Windows 11

If you want to uninstall the VirtualBox 7 from Windows 11, right-click (RMB) on the start menu and click on Settings.

Читайте также:  Linux ubuntu ftp сервер

The Settings app should be opened.

Click on Apps > Installed apps.

Search with the virtualbox [1] keyword. VirtualBox 7 should be listed as an installed software. To uninstall it, click on

> Uninstall [2] .

Click on Uninstall.

Click on Yes.

VirtualBox 7 is being uninstalled. It takes a few seconds to complete.

VirtualBox 7 should be uninstalled at this point.

Conclusion

In this article, we showed you how to uninstall the VirtualBox 7 from different operating systems.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.

Источник

How to uninstall VirtualBox in 12.04?

To remove VirtualBox, I actually recommend running this command and not replacing * with anything (just run it exactly like so):

sudo apt-get remove virtualbox-\* 

If you want to remove global configuration files too (this does not remove your virtual machines), run exactly this instead:

sudo apt-get purge virtualbox-\* 

That method is OK, but this way may be more thorough.

Explanation

  • You may have multiple VirtualBox-related packages installed. Assuming your machine no longer needs to be a VirtualBox host or guest machine, all these packages can go. For example, on the 11.10 box I’m using right now, there are 18 such packages available for installation (your machine might have some or even all of them, or other packages from your release or a PPA):
virtualbox virtualbox-ose virtualbox-dbg virtualbox-ose-dbg virtualbox-dkms virtualbox-ose-dkms virtualbox-fuse virtualbox-ose-fuse virtualbox-guest-additions virtualbox-ose-guest-dkms virtualbox-guest-additions-iso virtualbox-ose-guest-utils virtualbox-guest-dkms virtualbox-ose-guest-x11 virtualbox-guest-utils virtualbox-ose-qt virtualbox-guest-x11 

What does purge do here?

purge removes global configuration files only. It does not remove virtual machines, so it’s safe to use. However:

  • It also doesn’t remove most of the settings you might think it would. Remember, it removes global configuration files only. It does not remove any configuration files created by users that exist in their home directories and define how VirtualBox is configured for them.
  • Configuration files rarely take up a lot of space. If your goal is to free space but you think you may want to use VirtualBox again, you might prefer not to use purge .

Also, please note: apt-get —purge remove . is the same as apt-get purge . .

Источник

How to completely remove virtualbox [duplicate]

But when I reinstalled VirtualBox it again resumed to previous settings and started giving same problems. How can i completely remove VirtualBox from my laptop and then reinstall it such that it wont give same problem again?

You say it was giving you problems. You might wanna explain what exactly were the problems. That will help others help you

6 Answers 6

Your problem : Virtual Box keeps its folder and settings in your home folder. Delete everything inside the folder.

Uninstall VirtualBox first.

sudo apt-get remove --purge virtualbox 

Run these commands to delete all virtual machines and settings and Virtual Hard Drives:

sudo rm ~/"VirtualBox VMs" -Rf sudo rm ~/.config/VirtualBox/ -Rf 

If you want to install it again. Run this command:

sudo apt-get install virtualbox 

Kill any «ghost» processes you may think are relevant.

Читайте также:  Linux info about directory

After reinstalling virtual box by following your procedure it said that fedora was inaccesible so i just removed it. Has it been successfuly removed?

sudo apt-get remove virtualbox* --purge 

Just try one command for remove all VM. Or perticulary one VM

sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.* 

After that, you maybe get some instruction which will already give there you just need to type on the command line. Then again run same above command.

First find installed package using below command :

sudo dpkg -l | grep virtualbox 

Then copy packages and remove using dpkg or apt-get as below :

And also manually remove folder on home directory (~/»VirtualBox VMs»).

Honestly I thought apt would remove packages installed with dpkg, but it doesn’t even show virtualbox as being installed. Surprised that in 18.04.1 this is not linked up properly.

If you installed VirtualBox through the installer script, you can find the directory where it is installed by running

You can then run the uninstall script located in the install directory. Assuming it’s installed to /opt/VirtualBox , run

sudo /opt/VirtualBox/uninstall.sh sudo rm -rf /opt/VirtualBox/ 

This is the correct answer when virtualbox is installed with the installer and not with debian packages.

Working fine with VirtualBox script like: VirtualBox-6.0.18-136238-Linux_amd64.run from: download.virtualbox.org/virtualbox/6.0.18 Thanks

Open the terminal and type:

sudo apt remove virtualbox unity-scope-virtualbox ^virtualbox- 

How to uninstall Oracle VirtualBox

If you installed VirtualBox from the Oracle website find your VirtualBox version as follows:

sudo apt install aptitude aptitude search virtualbox\* 

The latest version of VirtualBox that has Oracle VM VirtualBox on the same line with it is the package you have installed. If you have the latest version of Oracle VirtualBox installed, it is named virtualbox-5.1 .

Verify that this version of Oracle VirtualBox is currently installed.

Uninstall Oracle VirtualBox using a command that looks like this:

sudo apt remove VirtualBox-5.1 

If you have a different version of Oracle VirtualBox installed replace VirtualBox-5.1 in the above command with your VirtualBox version.

In my case just the first line did everything. No further commands were necessary. The package shown in dpkg-query isn’t installed locally.

Your problem is not with VirtualBox, it is with your kernel. You appear to have somehow run into an issue which caused a mismatch.

Simply run sudo apt update && sudo apt install -f as you’ve been instructed by the system, and it should install the correct packages.

Once this is completed, I recommend rebooting (just to be safe, though it is not absolutely necessary), and then running sudo apt remove —purge *virtualbox* to remove VirtualBox and any related packages.

NB:

If you don’t run sudo apt install -f , you’re going to keep running into this problem with pretty much any package, as the package management system is left in a broken state until that issue is resolved.

Источник

Оцените статью
Adblock
detector