Sometimes you need a specific file from a Debian .deb package e.g. because you deleted a file from your system or the installation of a package is broken in that way that it can not be reinstalled without adding the missing file first. This FAQ shows you how to download the .deb file from the Debian or Ubuntu repository and then exctract its contents.
Download the dpkg file. In this example, I will download the courier-athlib:
aptitude download courier-authlib
Now extract the .deb package into the directory /tmp/extract/:
dpkg-deb -x *.deb /tmp/extract/