Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu 12.10.

I downloaded from the virtualbox package 4.2.4*.deb.

I wanted to install it with dpkg -i and terminal requested me to use command alien instead.

So I did alien <package> then dpkg -i <package> and used virtualbox.

Now I want to uninstall virtualbox (because something went wrong) because it was not installed with sudo apt-get install.

I want to use command dpkg -e <package> or dpkg --purge <package> but this ends with report

file or directory not found


sudo dpkg -l | grep virtualbox


ii  virtualbox-4.2                                  4.2.4-81684~Ubuntu~quantal                     amd64        Oracle VM VirtualBox
rc  virtualbox-qt                                   4.1.18-dfsg-1ubuntu1.1                         amd64        x86 virtualization solution - Qt based user interface

what should I do next ?

share|improve this question
up vote 2 down vote accepted

Run this command in a terminal window:

sudo apt-get purge virtualbox-4.2 virtualbox-qt

That should remove them both.

share|improve this answer
thank you ! I was blind ! of course sudo apt-get purge virtualbox is not sufficient and so system does not know which package. sudo apt-get purge virtualbox-4.2 virtualbox-qt is the solution ! – dschinn1001 Nov 29 '12 at 18:51
Glad to know it works! Could you mark it as the correct answer then? – MiJyn Nov 29 '12 at 18:52

You can also use sudo apt-get purge virtualbox*, which should also remove both.

share|improve this answer

Try like this

sudo apt-get --remove purge virtualbox-4.2 virtualbox-qt
share|improve this answer
moin. yes this is more correct ... thx. that was a while ago. Til later. – dschinn1001 Mar 9 '14 at 7:45

I also had run like this

sudo apt-get purge virtualbox-\*

But was not removing completely

To me following worked (Was trying this on Ubuntu 15.10 and Oracle Virtualbox 5.x)

dpkg -l | grep virtualbox

which listed as below

# dpkg -l | grep virtualbox ii virtualbox-5.0:i386 5.0.12 104815~Ubuntu~wily i386 Oracle VM VirtualBox

Then i used the command

sudo apt-get purge virtualbox-5.0:i386

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.