How to Install or Uninstall VirtualBox in Ubuntu

Photo of author

By Oluwaseun Bamisile

Published

Want to install or uninstall the VirtualBox app on your Ubuntu Linux-based computer? You should read this article, as it shows multiple ways to do that.

Before continuing, you should understand that the steps and screenshots demonstrated in this guide are based on the Ubuntu 22.04 LTS OS. Therefore, the steps and screenshots might be a bit different on other versions of the Ubuntu OS.

How to Install VirtualBox

There are two major ways to install the VirtualBox application in the Ubuntu Linux-based operating system. You can either install the program through the Ubuntu Software store in the GUI or via the terminal.

The following sub-sections will demonstrate how to install the app using those methods.

Option 1: Install VirtualBox Through the Ubuntu Software Store

  1. On the Ubuntu dock, click the Show Applications icon to open the application menu. Next, input “software store” in the search field, then select the Ubuntu Software store icon from the search result.
  1. In the Ubuntu Software store, click the search icon at the top left corner to access the search bar. Then, type “VirtualBox” in the search bar and select the VirtualBox application from the search result.
How To Install VirtualBox In Ubuntu
  1. On the Virtualbox installation page, click the green Install button.
  1. Consequently, you will receive an authentication prompt. Hence, type your computer’s password in the input field on the prompt, then click the Authenticate button to proceed.
How To Install VirtualBox In Ubuntu
  1. By doing that, the VirtualBox application should start installing on your Ubuntu computer.

Option 2: Install VirtualBox via the Terminal

  1. Right-click any free area on the Ubuntu desktop, then click Open in Terminal from the context menu. You can also use the Ctrl + Alt + T keyboard shortcut to open the terminal in Ubuntu.
How To Install VirtualBox In Ubuntu
  1. When the Ubuntu terminal opens, run the command below to update the Ubuntu repository. Consequently, you will be asked to input your computer’s password – do that and press the enter key.
sudo apt update
  1. After doing that, execute the following command to install VirtualBox.
sudo apt install virtualbox
How To Install VirtualBox In Ubuntu
  1. Then, you should receive a couple of information regarding the installation. Also, you will be asked if you want to continue with the installation – type “y” and press the enter key to continue.
  1. Consequently, the Virtualbox application should start to install on your Ubuntu computer.
How To Install VirtualBox In Ubuntu

How to Uninstall VirtualBox

The same methods used to install the VirtualBox app in Ubuntu are also the methods you can use to uninstall the app. Basically, you can uninstall the application through the Ubuntu Software store in the GUI or via the terminal.

However, if you install the app through the Ubuntu Software store, it is recommended you uninstall it via the Ubuntu Software store. Likewise, if you install the app using a certain command in the Ubuntu terminal, then you should uninstall it using the same command in the terminal.

For example, we installed the VirtualBox app in the previous section using the apt command. Thus, we will use the same command to uninstall the app in this section.

With that being said, the following sub-sections will provide multiple methods to remove VirtualBox in Ubuntu.

Option 1: Delete VirtualBox Through the Ubuntu Software Store

  1. Click the Show Applications icon on the Ubuntu dock to access the application menu. Next, enter “software store” into the search box, then choose the Ubuntu Software store icon from the search results.
How To Uninstall VirtualBox In Ubuntu
  1. In the Ubuntu Software store, switch to the Installed tab.
  1. Now, search for the VirtualBox application among the installed app. Then, click the Uninstall button beside the application.
How To Uninstall VirtualBox In Ubuntu
  1. By doing that, a dialogue box should appear, asking if you are sure you want to uninstall the application. Click the red Uninstall button on the dialogue box to proceed.
  1. Consequently, you should receive a prompt asking for your computer’s password for authentication. Hence, input your computer’s password and click the Authenticate button to uninstall VirtualBox.
How To Uninstall VirtualBox In Ubuntu

Option 2: Uninstall VirtualBox Through The Terminal

  1. Open the terminal in Ubuntu by right-clicking any free area on the desktop, then selecting Open in Terminal. You can also open the terminal in Ubuntu by pressing the Ctrl + Alt + T keys on your keyboard simultaneously.
  1. When the terminal opens, type the command below and press the enter key. Hence, you will be requested to input your password before proceeding – do that and press the enter key to uninstall VirtualBox in Ubuntu.
How To Uninstall VirtualBox In Ubuntu

Frequently Asked Questions

1. Is VirtualBox free in Ubuntu?

Yes, the VirtualBox application is free on the Ubuntu Linux-based operating system.

2. How do I install VirtualBox in the Ubuntu Software Center?

Follow the steps below to learn how to install the VirtualBox program through the Ubuntu Software Center.
a) On the Ubuntu dock, click the Show Applications icon to open the application menu.
b) Next, input “software store” in the search field, then select the Ubuntu Software store icon from the search result.
c) In the Ubuntu Software store, click the search icon at the top left corner to access the search bar.
d) Then, type “VirtualBox” in the search bar and select the VirtualBox application from the search result.
e) On the Virtualbox installation page, click the green Install button.
f) Consequently, you will receive an authentication prompt. Hence, type your computer’s password in the input field on the prompt, then click the Authenticate button to proceed.
g) By doing that, the VirtualBox application should start installing on your Ubuntu computer.

3. What is VirtualBox?

VirtualBox is a free and open-source virtualization program that allows users to run multiple operating systems on a single physical computer. It enables users to create virtual machines (VMs) that can run different operating systems, such as Windows, Linux, and macOS, concurrently on the same computer.

4. When was VirtualBox introduced?

The VirtualBox program was first introduced in 2007.

5. Can I uninstall VirtualBox via the Ubuntu terminal?

Yes, you can uninstall the VirtualBox app on your Ubuntu Linux-based computer through the terminal.

Conclusion

VirtualBox is a powerful virtualization program that enables users to run multiple operating systems concurrently on a single physical computer. It is a useful tool for testing new software, running legacy applications, and creating testing environments.

Fortunately, this guide provided multiple ways to install or uninstall VirtualBox in Ubuntu. Specifically, we learned how to install the app through the Ubuntu Software store and via the terminal.

Using those methods, this guide also taught us how to uninstall the VirtualBox in Ubuntu.

I hope this guide was helpful to you. If it were, click on “Yes” beside the “Was this page helpful” question below.

You may also express your thoughts and opinions by using the “Leave a Reply” form at the bottom of this page.

Before leaving this page, you may go through our Linux how-to page to find our other helpful Linux how-to guides.

About the Author

Photo of author

Oluwaseun Bamisile

Oluwaseun is the Lead Content Editor at Itechguides.com. He holds a National Diploma in Computer Science (currently studying part-time for his Higher National Diploma). An internet geek with a love for automobiles, he writes product reviews, tech articles, and how-to guides on the site.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend