I have created rpm packages for a software along with debuginfo. For Ubuntu/Debian , I have only the software packaged as .deb but don't know how to create debuginfo .deb package. Please let me know how to create them.


1 Answer 1


Packages in the official archives have debug packages build for them automatically. They are stored in a different archive though. They will have the names foo-dbgsym You can access them by putting the following in your /etc/apt/sources.list:

deb http://ddebs.ubuntu.com natty main restricted universe multiverse
deb http://ddebs.ubuntu.com natty-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com natty-security main restricted universe multiverse
deb http://ddebs.ubuntu.com natty-proposed main restricted universe multiverse

(Replace natty with the release you are running.)

Information on how these are generated can be found here:

If you'd like to provide debug packages for a package which you maintain outside of the official archives, that is possible as well. This Debian wiki article is the best place to start.

Briefly, you must first create the new package in debian/control by adding:

Package: foo-dbg
Architecture: any
Section: debug
Priority: extra
    foo (= ${binary:Version}),
Description: debugging symbols for foo
 foo is a library that lets you do stuff.
 This package contains the debugging symbols for foo.

Then in debian/rules, use dh_strip to strip debugging symbols from binaries, but retain them for use in the debug packages.

        dh_strip --dbg-package=foo-dbg
  • 4
    For ubuntu build chroots, installing pkg-create-dbgsym will cause packages built in that chroot to also output -dbgsym packages when stripped. This works for pbuilder, sbuild, cowbuilder, etc. and is how the "automatic" -dbgsym packages are generated in Soyuz. Jul 21, 2011 at 2:50

You must log in to answer this question.

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