I have always had a problem installing and removing compiled software, so I have decided I would like to build software from source into a .deb package for easier installation/removal.

I would like to know of an easy and short way to build source into a .deb package, as an end user.

I have tried:

  • 1
    Ubucompilator is an interesting project, and I applaud their efforts to date. However, as you discovered, it only provides a GUI front-end to four or five low-level commands. And, NO, you can not use it to easily create a proper '.deb' package.
    – david6
    Commented May 23, 2012 at 7:11

4 Answers 4


checkinstall does what you want to achieve: it will monitor which files get installed and put them into a .deb package, which can then be installed and removed

Install it with

apt-get install checkinstall

then you do the normal install from source procedure, replacing 'sudo make install' with 'sudo checkinstall':

  sudo checkinstall

Reference: https://help.ubuntu.com/community/CheckInstall

  • sudo checkinstall will take a couple extra minutes to run, but this is worthwhile to avoid making your system a franken-debian pet. Being able to easily later cleanly remove that specific version makes it far easier to recover from problems should they occur. You can just uninstall and reinstall again, or maybe try an apt version. It's not necessary to go to too much effect to completely configure the .deb: eg, depends / conflicts etc: being able to revert your system is all you really need: you can safely play around with the details if you want apt taking better care of your extended OS.
    – RGD2
    Commented May 22 at 1:02

We have a really good Packaging Guide that has a section on the topic of new packages.

  • 1
    I recommend this link, as it contains all the information someone would need. Also, if there's any specific questions, I may be able to help with them, but not for explaining the entire procedure of creating a debian package from source.
    – Thomas Ward
    Commented May 29, 2012 at 16:35
  • @ppumkin: updated.
    – tumbleweed
    Commented Feb 20, 2015 at 7:46
  • Its not good, link recommends a command that has been removed... likely for good reasons.
    – axkibe
    Commented Nov 14, 2023 at 13:04

I have used the make checkinstall command on several occasions to create a .deb package on one machine to be installed on my other servers. It is a fast way to install a Beta version. It works, but should be used with caution. There are pitfalls for the user who does not understand the many functions of the .deb package.

I have twenty-some servers that use the same home grown apps. Adding the build support and compiler to each host is not that difficult.

Entering the commands to download and compile a new version twenty times is time consuming. The alternative is to upload a script to do the task and then execute the script. But it is often easier to update applications using the .deb file created with checkinstall.


The task of packaging some random piece of software code into a .deb is a fairly complicated one if the software didn't come in that form already, especially compared to just make, make install. If you want things to be simpler, I think you're moving in the wrong direction.

I'm not saying you can't do it - Debian developers do it a lot. But it doesn't seem like the simplest way to do what you want.

Maybe you should concentrate more on learning how compiling and installing software from source "works". In your favour is the fact that everything you've installed yourself should end up in /usr/local

  • thanks for the sugestion , but i already know about compiling softwares, i hav quiet a number of them compiled on my system. Te only thing i find tough is upgrading or removing them. So i though a deb file would be more handy
    – Ashu
    Commented May 23, 2012 at 4:31
  • The reason a deb package can smoothly upgrade or remove itself is that someone has painstakingly written scripts that do this, for each package. In addition they've had to add a whole lot of other descriptive metadata which dpkg can use to determine what files are. You'll have your work cut out for you. Commented May 23, 2012 at 4:33
  • 1
    Actually, just go with Floyd's answer. It looks like a way better solution overall, if it really does what it says it does! Commented May 30, 2012 at 3:47
  • Yup. Floyd's solution is great. Especially now, its extremely mature. Now I don't have to build from source on tons of servers. :)
    – Jack_Hu
    Commented Oct 17, 2019 at 10:27

You must log in to answer this question.

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