Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

When packaging Ubuntu packages, there's always these funny .dir and .install files around. I suppose their purpose is to somehow indicate what files are to be installed, but I'm not so sure about what the the format of those files is, nor what the consequences are when they are omitted.

share|improve this question
If you're trying to package a binary program as .deb, use the provided tools, make a proper debian "source" package -- in this case, you're providing already-compiled binary files, you may use dh_make and edit the file debian/install to point your files to the appropriate folder. Personally, I've never seen, nor tampered with ".install" or ".dir" files/folders. – medigeek Sep 1 '12 at 21:34
Well it seems that if I totally remove all of those files, nothing is installed at all although the libraries and headers are to be found in pretty much standard folders. – Nico Schlömer Sep 2 '12 at 2:56
up vote 3 down vote accepted

debian/install and debian/packagename.install files both have the same purpose, the latter being used in case you build multiple binary packages from the same source (so you need to distinguish which files go into which resulting package).

If the source Makefile(/other install system) already takes care of installing for you, they are generally not needed, (extra) files that aren't installed otherwise can be installed by these.

The syntax is simply:

path/sourcedir/file path/installdir
# for example
data/foo.jpg usr/share/packagename



Likewise goes for debian/dirs and debian/packagename.dirs which instead creates empty directories:


It's normally unnecessary unless you specifically need an empty directory or if there is a problem with the source Makefile...


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.