I would like to modify some functionalities in the apt-get package manager, but I can only find the apt-get binaries.

Where is the source code for the package manager?


1 Answer 1


Enable deb-src type repository in /etc/apt/sources.list:

deb-src http://archive.ubuntu.com/ubuntu/ trusty main

Replace trusty with the codename of the release you are using. You can find the codename by:

lsb_release -c

Now sync the local package lists with remote repositories:

sudo apt-get update

Now you can download the source package of apt in the current directory:

apt-get source apt

From the extracted directory, the file you are looking for is:

  • Right as I was writing the answer, you beat me to it. =)
    – Terrance
    May 1, 2016 at 14:10
  • @Terrance Happens to most of us ;)
    – heemayl
    May 1, 2016 at 14:11
  • Well, he who as the fastest fingers will win! ;)
    – Terrance
    May 1, 2016 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.