Advertisement
     
 
 
Search:
General | Linux Hacking | Linux Networking | Linux Security | Windows Hacking
       
How to uninstall programs on your linux by creating packages! PDF Print E-mail
Written by MoemF   
Wednesday, 26 January 2005
Hi, this article would be very helpful for people who rely on compiling softwares from sources in order to install them on their linux boxes, and have problems uninstalling those softwares. This is my case, since having slackware as your only distro, you got to compile almost every thing since there is leak of packages.

Compiling software from source has its advantages, since u can tweak it for your hardware / needs. But in the other hand, unistalling software would be somehow very difficult.

Few programmers add an uninstall option to the Makefile, such that a "make uninstall" rarely works, and besides, who'll keep the sources directory sticking for ever.

In my opinion the best solution is the following:
1. Get the sources of the program u want to install.
2. Compile it to suit your needs.
3. Make an "rpm", "deb" package, or a slackware "tgz" package depending on your distribution.
4. Install the package u just did. :)

This way you have compiled a program for your hardware, with options you want, you can use on other machine, publish it online, and what we care about must " it can be removed whenever we want"

OK so now how to do these things.

Get Checkinstall from here. Check install is a program to make slackware / debian / rpm packages out of compiled sources, a very easy and useful program. Untar / unzip then ./configure && make && make install ( check install will ask you if u want to make a package out of it own compiled binaries, choose yes since it is a good idea if u ever wanted to remove it).
Now that you have checkinstall on your computer making a package will be a trivial thing.

OK now suppose i want to make a slackware package for xchat-1.8.9, what shall i do ?

a) Get xchat sources from xchat's site
b) Untar/gunzip the xchat-1.8.9.tar.gz file with: tar -xzvf xchat-1.8.9.tar.gz
c) Run the configure script with what ever option you want, i usually use ./configure --enable-panel --enable-python
c) Now compile xchat with : make
d) Now make a doc-pak directory, this is not necessary, copy there all the documentation files, those files will be installed to /usr/doc/xchat-1.8.9/ if u skip this step, default documentation files will be used, these are : README, INSTALL, COPYING, ChangeLog, TODO, CREDITS.
e) Create a file called "description-pak", and put in it description about your package.
f) Now su to root.
g) type: checkinstall, it may ask you some questions, then it will ask you what packaging method to choose,
"S" for Slackware, "D" for debian, or "R" for rpm, choose the one that you want.
Then the program will automaticly install the made package.

Et voila, you will get in your working directory an xchat package called: xchat-1.8.9-i386-1.tgz or .rpm or .deb depending on what you choosed.
you can remove it when ever you want or install it on other machines or share it online.

Thanks for reading this small tutorial that is far from being perfect.
Please send comments to echogen@hotmail.com
Sorry for my english since it is not my native language.

Links:
http://linux.box.sk
http://linuxpackages.net
http://checkinstall.izto.org
http://www.linuxexposed.com
http://linux.box.sk/newsread.php?newsid=414


Add as favourites (150)

  Be first to comment this article

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
Comment:

Code:* Code

 
< Prev   Next >
 
© Copyright 2002-2008 - Linux Exposed - Sponsored by ConsultPlanet http://www.consultplanet.nl - Contact Linux Exposed