Search code examples
c++clinuxpackagedeb

Programmatically extracting .deb packages


I have .deb package whose contents I need to extract in a programmatic way. However, I am not able to find any resources on the topic, such as .deb package format specification, which would give me some more idea how to approach the problem without going and reverse engineering the whole thing.

Any ideas?


Solution

  • If you don't find a library for this (I didn't, either), and cannot resort to running system commands, you can always implement your own to read ar archives. The ar file format isn't terribly complicated.