1

I would like to find where information is stored about which RPM packages are installed?

I know that there is a internal database for this. Can I access somehow this database with Java?

  • 3
    Can you tell us what you'd like to do with the DB information? Is there any reason the rpm userspace tools aren't sufficient? – ewwhite May 15 '14 at 18:46
2

/var/lib/rpm
It is a Berkeley DB.
The database is used to keep track of all files that are changed and created.

Details taken from
http://en.wikipedia.org/wiki/RPM_Package_Manager#Local_RPM_installation_database

|improve this answer|||||
  • Any more information how I can do this with Java? – Peter Penzov May 15 '14 at 18:51
  • Sorry, not my area of expertise. – 0xSheepdog May 15 '14 at 20:26
2

They are stored in berkeley DB format, typically in /var/lib/rpm.

As far as I am aware there are no decent or maintained bindings for RPM in java. You can of course open the berkeley DB file in java and inspect it like that, but I suspect that might be a painful experience.

|improve this answer|||||
  • Any more information how I can do this with Java? – Peter Penzov May 15 '14 at 18:49
  • I think that question is more for stackexchange. Or you could use another language like python, perl or the C API. – Matthew Ife May 15 '14 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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