Ubuntu – Where does ‘apt-cache depends’ collect the dependency information from

aptdependenciesdpkgpackage-management

I want to modify the dependencies of a debian package and I have made changes in its control file. But, the list of apt-cache depends pkg_name still displays the removed dependencies. So, where does the above command fetches the dependency list of a debian package from? Is it not from the control file?

Best Answer

apt-cache data comes from lists within:

/var/lib/apt/lists

e.g:

grep -i "Package: wget$" -A10 /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_zesty_main_binary-amd64_Packages

However as you know, the deb package's meta-data, contains a list of dependencies too.

So if you want to see what a deb file thinks of its own dependecies run:

dpkg -I package-name.deb | grep -i depends