When I install a software from its binary package using rpm or yum, I can later query for meta-information (rpm -qi PACKAGE, rpm -ql PACKAGE, ...) and can uninstall it (rpm -e PACKAGE).

But with the software that I build and install from its sources, I have to keep hanging on to the build directory forever to later be able to uninstall it, since removing the build directory would make it impossible for me to later uninstall the software! Even if you could hold on to the build directory forever, querying for meta-information isn't easy either, unless you know the intricacies of make files.

Question: Is there any way to, sort of, 'register' the binaries being installed (which is usually during the make install step for most software packages) with the rpm/yum database, to allow easy uninstall later and for meta-information querying?

  • 1
    If you aren't bent on using rpm, see Keeping track of programs Commented May 21, 2012 at 22:51
  • 1
    You can also have a look at checkinstall which is mentioned in an answer linked from @Gilles - it should be able to create rpm packages Commented May 22, 2012 at 3:03
  • @UlrichDangel I've not tried checkinstall just yet, but from the description of it, looks like this is exactly what I was looking for. Can you copy-paste your comment as an answer, so that I could mark it as final? Thanks. +1.
    – Harry
    Commented May 22, 2012 at 3:45

4 Answers 4


One option to achieve your goal is to "roll" your own RPM. It's not a trivial task, but once you understand the process, it can be done fairly painlessly in just a few steps (depending on the level of sophistication required for the software). I have to install a lot of built from source software for my customers, and I find that when possible, taking the time to create an RPM is administratively beneficial over the life of the software. I still control the build process, I just take the effort a step further and wrap up the built software into a tidy RPM package.

From my experience, benefits of installing the software as an RPM include

  • Users are able to query the RPM database to find out information about the installed software
  • I can easily push the package out to multiple machines via a custom yum repository
  • Installation and removal of the software becomes simplistic
  • I can take advantage of all the benefits of using the RPM package manager
  • I am able to keep different versions of the software "in archive" by keeping the RPM and SRPM files
  • I can share my efforts of a custom built RPM with a wider community

The Fedora Project wiki has a good tutorial explaining the process and steps to create a custom RPM. This is a great starting point and gives you an idea of the power available to you when customizing your own RPM.

  • Thanks, I appreciate your time and the link you provided, but I think I'm gonna go ahead with the checkinstall program suggested by Ulrich above. +1.
    – Harry
    Commented May 22, 2012 at 3:43

Technically, yes. But any information you'd have to gather in order to populate the rpmdb you'd need for the spec file regardless, so it's generally more productive to generate a spec file for the purpose of reuse or sharing.


Good binary packages will deliver or create a spec-file.

Very good binary packages deliver spec files wich can be used without any change to create a SRPM: rpmbuild -bs file.spec

Then you can make a binary rpm: rpmbuild -rebuild file.SRPM


Answer based on Ulrich's comment:

I've not tried checkinstall just yet, but from the description of it, looks like this is exactly what I was looking for.

Note to Ulrich Dangel: If you can copy-paste your comment as an answer, I will mark it as final. Until then, this is the final answer. Thanks.

You must log in to answer this question.

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