I'm fairly new to the Linux world, so forgive me if the question is basic, I couldn't find an answer elsewhere.

When I run dpkg to install the version 5.1.14 of Virtualbox via sudo dpkg -i ./debfile followed by sudo apt install -f, i get:

    The following additional packages will be installed:
    Recommended packages:
    The following packages will be upgraded:

The installed package ends up being version 5.1.32, which I do not want. I know how to prevent a package from being upgraded after it's installed, but not while it's being installed.

I'm also forced to use dpkg because both apt and gdebi don't work for some reason, possibly because the version I want to install was meant for Ubuntu 16.10, and it's possible Virtualbox at version 5.1.14 won't work for me at all on Ubuntu 17.10, but I wish to try it anyway.

So, is there a way to force the installation of my preferred version, without it getting upgraded automatically?

1 Answer 1


Since there are not any missing depends, sudo apt-get install -f is unnecessary.

The following command will prevent changes to the package:

sudo apt-mark hold virtualbox-5.1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .