Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Being an early adopter and using 11.04 daily builds I sometimes meet a situation when some packages require earlier versions of other packages than those I have installed. Usually newer (but refused) versions of needed packages provide all the functionality of their older versions.

If I use dpkg -i --force-depends-version to install dependent packages everything works fine, I've never seen a problem.

Instead of manually downloading and installing every package, can I just make the system pretend there is a specific package version installed when there is a newer? Or is there a --force-depends-version key equivalent for apt-get?

share|improve this question

2 Answers 2

up vote 13 down vote accepted

You can use the equivs Install equivs package to create a dummy package to fake a given package being installed. Some instructions here.

share|improve this answer

Despite an answer being already accepted, I think inlining the accepted answer deserves some attention:

There is a Debian package called equivs that is able to create dummy packages. Install it by running sudo apt-get install -y equivs

Once installed, you generate a template "control" file using the following command: equivs-control postfix (replace postfix) with your package name.

In my case, I typically use an alternate package name, e.g. postfix-custom or whatever.

Once the template control file is generated, I will typically remove a lot of the commented out statements (statements that begin with #). One that I like to keep specifically is the Provides: statement where I can say that my package provides the capability offered by the other package that I'm trying to fake, e.g. Provides: postfix tells the Debian/Ubuntu dependency resolution mechanism that my package of whatever name provides the same capabilities of the target package, again postfix or whatever. This allows me to name my package independently of the target package to avoid confusion. Erlang Factory does this with their stuff, e.g. esl-erlang provides erlang.

Finally, once the template control file is created, you use equivs-build to generate the fake package, e.g. equivs-build /path/to/generated/control/file. It takes a few seconds to build the package and then you can run sudo dpkg -i my_package_name*.deb

For advanced users, if your template control file has a Requires: dependency line, you'll want to use a tool like gdebi to install your package and the packages it requires.

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.