Background: I would like to regularly download and install source to /usr/src for certain important development packages. (For me: Qt5 and friends.)

I have seen this other question about one-time downloads of Debian source packages. However, one-time downloads of Debian source packages will not keep source code current each time the associated binary package is updated.

Example: Package qtbase5-dev has source package qtbase-opensource-src. Each time package qtbase5-dev changes, the source package will not be automatically downloaded and installed into /usr/src.

Is there an existing way to do this using aptitude (preferrably) or apt?


1 Answer 1


I don't know of a way to do all you're asking for with aptitude or apt, but apt-src provides apt's features for source packages:

apt-src update
apt-src install package
apt-src upgrade

will respectively update the information on available packages, install package's source code, and upgrade the source code if necessary.

Other options are available to build the packages from source after installation, remove source code etc.

By adding apt hooks you could configure your system so that the source code of packages you install is automatically downloaded and upgraded.

You must log in to answer this question.

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