I would like to use some Java applications on Ubuntu that are packaged as .debs and hold java-common & friends as a dependency.

However, I do not wish to use the JVM that is packaged with Ubuntu or Debian; I would like to use Sun/Oracle's, and have downloaded and installed the raw tarball elsewhere on the system already.

The problem is that if I force-install these packages without dependencies, i.e. dpkg --force-all -i, it breaks my APT package repository such that any new package installation will prompt me to resolve those dependencies (i.e. apt-get -f install).

Is there any way I can tell APT to permanently ignore dependencies for a given package?

1 Answer 1


You can use the equivs packages: it will let you build a package having the same name than those you don't want to be installed:

equivs-control java-comon.control

will create a file with the given name (java-comon.control) that you have to edit to you liking (at least, set the name field to the name of the package you wish to replace, you might need to set the version to the version of the package you wish to replace)

Then run

equivs-build java-comon.control

to create the debian package you can install to make apt happy

Note that this could confuse the dependency solver, and that you use this to replace some important package, you could break you Debian installation.

You must log in to answer this question.

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