I am not able to delete the following 2 packages :


When I do

sudo apt-get purge virtualbox-ext-pack

it returns the following:

Sub-process /usr/bin/dpkg returned an error code (1)

and when I do

sudo apt-get purge virtualbox-dkms

it returns:

The following packages have unmet dependencies:
virtualbox-ext-pack : Depends: virtualbox (>= 5.0) or
                            virtualbox-5.0 but it is not going to be installed or
                            virtualbox-5.1 but it is not going to be installed

What should I do?

  • 1
    Try sudo apt-get install -f
    – Liso
    Oct 13, 2016 at 5:41
  • Well, you've stepped into this trap... AFAIK you should clear dpkg package record manually.
    – Danatela
    Oct 13, 2016 at 5:45
  • Try this: delete broken package
    – Danatela
    Oct 13, 2016 at 5:49
  • @Danatela Tried this ....does not work
    – humble
    Oct 13, 2016 at 5:49
  • 1
    @Danatela Is APT not the usual way, or did I miss something?
    – wjandrea
    Oct 13, 2016 at 6:14

1 Answer 1


Was finally able to remove the packages

First I needed to do

sudo apt-get install -f

as suggested in comments and then

sudo apt-get purge virtualbox-ext-pack
sudo apt-get autoremove
sudo apt-get purge virtualbox-dkms
sudo apt-get autoremove

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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