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

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 have a packages deb file with all dependencies deb file. Is it possible to create a final deb file(one file) using all. Say example firefox.deb has 10 dependency .deb file. So there is a order to install all the dependency then at last firefox.deb. May i create a fullFirefox.deb file which automatically maintain everything ? I do not have source, just have deb files.

share|improve this question
up vote 5 down vote accepted

It is possible, but you'll likely run in several issues. First, each package has it's own pre- and post-installation scripts and dependencies in the control file. Even if you make a package provide the contained packages using the Provides field, future upgrades may ruin your God package:

  1. You install your God package which provides a lot packages
  2. One of the packages are being updated, like libpango1.0-0
  3. If you upgrade that package, your God package will be removed. If there are any dependencies on it, apt-get has an unresolvable conflict.

So, it's better not to create a God package, but install each package separately. If you need to install software offline, see How can I install software offline?

How to create a God package (not recommended):

  1. Create a temporary directory, e.g. "~/godpackage" and cd into it
  2. Extract each .deb file using dpkg -x filename.deb .
  3. Extract the control, postrm, ..., files using dpkg --control filename.deb tmpdeb. A new directory will be created, named tmpdeb. Adjust the control files like changing the name to avoid conflicts later. When done, move / merge the tmpdeb directory with the DEBIAN directory (create if needed). Repeat it for each deb file
  4. Go away from the directory: cd ..
  5. Create the new debfile from ~/godpackage and store the newly created .deb file in the current directory: dpkg-deb --build ~/godpackage .
share|improve this answer
thank you Lekensteyn. Your information is very helpful for me. Will you please explain what does "When done, move / merge the tmpdeb directory with the DEBIAN directory (create if needed)" mean? – shantanu Aug 29 '11 at 9:52
A package should have a DEBIAN directory containing the control file and optionally postinst, postrm, preinst, prerm and some others. All libraries run ldconfig in their postinst script, so that can easily be merged. It gets more difficult if a post-installation script depends on a configured package. Finally, it makes debugging much harder, if one action in the {pre,post}{rm,inst} scripts fail, it'll quit or lead to unexpected behavior. – Lekensteyn Aug 29 '11 at 9:57

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.