2

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

1 Answer 1

2

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:

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

You must log in to answer this question.

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