LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   uninstalling compiled programs (https://www.linuxquestions.org/questions/slackware-14/uninstalling-compiled-programs-537552/)

anwar 03-14-2007 07:08 PM

uninstalling compiled programs
 
Hi! I'm wondering, how do I uninstall the programs I compiled myself? I deleted the source so I can't do make uninstall, is there a solution to this? Thanks!

GrapefruiTgirl 03-14-2007 07:31 PM

Hmm.. No perfect and simple solution that I can think of.
Since you deleted the source, you can't do another install to see what gets installed where.
If you had used checkinstall, you would have a record, but I guess you don't use checkinstall..

Slackware's pkgtool offers a function which makes your system clean, as in, removes stuff that does not come with the original Slackware distribution; that would probably work well, but would also remove other things you've installed yourself which perhaps you don't want removed.

You could manually search or find, looking for any/all binaries, files, scripts and folders created by the program by name, and manually delete them.

Good question, beyond these suggestions; I look forward to others' suggestions as well, as there is likely something I know nothing about too!
:)
PS - **possibly** Slackpkg would work, but I'm not sure if it would work on stuff that wasn't installed using it. If it *did* work, it would be a matter of typing:

slackpkg --uninstall packagename (possibly --remove instead of uninstall, it isn't fresh in my mind)
Also, a lot of programs make a install log file which would likely show paths involved, but if you deleted the source, I would guess that any log is also deleted.

rje_NC 03-14-2007 08:06 PM

Just reinstall the source files and see if there is a "make clean" or "make uninstall" option with the source makefile.

In the future, you should try to use the checkinstall program in place of "make install" when compiling and installing source packages. This makes it MUCH easier to remove the program later.

Bob

XGizzmo 03-14-2007 08:07 PM

Slackpkg can only track packages, If you redownload the exact same source and if the source has uninstall capabilities then you can extract the source configure the source exactly the same way and then do a make uninstall. If the source does not have a make uninstall the install the compiled source with checkinstall ( located in extras on the cds/dvd ). install the created package then uninstall with removepkg or slackpkg. The only other thing you could do if find every single file/directory and remove it by hand.

Franklin 03-14-2007 08:20 PM

Many (but not all) programs will install to /usr/local unless you specified otherwise during ./configure (i.e. --prefix=/usr).
KDE apps will often default to /opt/kde. You could look in /usr/local/bin for the executable and if it's there assume the rest was installed in /usr/local/lib and such.

Or, you can download the source and run ./configure --help to see what the defaults are.

HTH

You may in the future wish to use checkinstall or a slackbuild script to create a package which will simplify things considerably.

anwar 03-14-2007 08:33 PM

Thanks for the suggestions! I'll check out checkinstall :)

I wonder if someone compiled a guide of common practices like these for us slackware newbies? :)

H_TeXMeX_H 03-14-2007 08:33 PM

I always install source packages with paco or some similar program. That way I can quickly and easily remove them when I want.

rkrishna 03-15-2007 02:12 AM

once i did this, here was my way

1.make a slack package from same source, i use checkinstall (it is shipped with slack 11 /extra folder ) ./configure,--> make -->checkinstall
2.install the new package, this will rewrite on the existing files
3. now remove the package using pkgtool or removepkg

rkrishna 03-15-2007 02:22 AM

sorry tht i didnt saw tht you deleted the source
Quote:

slackpkg --uninstall packagename
all those deal with packages we dont even have a packagename

gnashley 03-15-2007 03:23 AM

Try using src2pkg for a more complete solution than checkinstall:
http://distro.ibiblio.org/pub/linux/...migo-PkgBuild/

anwar 03-15-2007 04:17 AM

I tried src2pkg on zsnes source but it wouldn't work. It couldn't find the doc folder and wouldn't create a package.

Lufbery 03-15-2007 08:33 AM

Quote:

Originally Posted by rkrishna
once i did this, here was my way

1.make a slack package from same source, i use checkinstall (it is shipped with slack 11 /extra folder ) ./configure,--> make -->checkinstall
2.install the new package, this will rewrite on the existing files
3. now remove the package using pkgtool or removepkg

I did exactly this same thing. There's a good article on using checkinstall here: http://enterprise.linux.com/article....1523201&tid=89

The readme file that comes with the version distributed with Slackware also has some very good information.

I've found that it's important to use Slackware's packaging tools to install and uninstall programs. I use pkgtool because I like the user-friendliness of it. :D

Regards,

-Drew

gnashley 03-15-2007 12:06 PM

anwar, thank you for trying src2pkg. You tried to make a packahe from sources which don't install the documents by default.

src2pkg will refuse to make the package when no docs are installed by 'make install' or whatever install command was used. This is a default behaviour that I 'impose' on sources, since it's not really good 'open source etiquette' to install a package without even a license. It doesn't have to be this way, but I try to get src2pkg to make the best package possible or refuse.

There are several ways to easily remedy the problem.
One is to specify the DOCLIST (-d option). You usually do this when you need to include extar docs, or the included docs don't fit any of the 'standard' named documents.

The second way is to use an extar install rule. The sources you tried probably will work this way, since they have a doc dir. Have a look at the Makefile and see if it has a separate rule for install_data or install_docs. If so, you can get the docs included by passing this option to src2pkg: -i='make install install_data'

If that doesn't work, you can still easily include a line in the name.src2pkg build script. First, generate the script with any arguments you are passing to src2pkg, but also include the '-N' option. This will generate a script and slack-desc without trying to build. then open the script in your favorite editor and add this line just after 'fake_install' :

mkdir -p $PKG_DIR/usr/doc/$NAME/$VERSION
cp -a $SRC_DIR/doc/* $PKG_DIR/usr/doc/$NAME/$VERSION/

Actually, I'm soon going to include a routine which searches for the $SRC_DIR/doc directory if no documents have been found otherwise. Meanwhile, it's really good when you have to script these things because it points out the fact that the sources won't build correctly with the standard commands. The original purpose of the program was to always use a build script. The default method and commands for building mostly assumes that an acceptable package can be created with just the commands 'configure, make, make install'. Recent development has brought src2pkg to where it will figure out lots of problems and automatically fix them.
If you build with the -A option much of this info will get written into the script (at the end of the build). This is one of the reasons that generated scripts have the '.auto' suffix. the way I use the scripts is like this: If it contains any extra options or modified code I remove the '.auto' suffix. This way I can tell at a glance if the script conatins any non-standard stuff.
I'll try to remember to include the doc-dir search in the next release. I've taken a break from coding src2pkg for a couple of weeks. The last release cost me about 6 weeks of solid work and I got burned out a little. So, I've been relaxing by writing a pretty cool auto-mounter for USB devices, including placing an icon on your desktop, etc.

rkrishna 03-16-2007 12:54 AM

dear gnashley,
i had been looking at all your posts, most of the time it is descriptive. for the same package issue you had posted many. it would have been nice if you make a page in your amigo home, regarding the package and src2pkg and put the link here in LQ whenever needed, or copy and paste from your home (with the necessary additions), so that your precious time wont be wasted in typing all and all the same ideas.

or start a thread regarding src2pck, so that everyone knows about it, can try it. make comments
regards

gnashley 03-16-2007 04:15 AM

I appreciate your concern for my time which I do try to economize. I used to spend hours every day writing detailed posts. Trouble is that even nice threads go down the list. And for most people the forum is a social thing.
Here's the thread which announced src2pkg:
http://www.linuxquestions.org/questi...hlight=src2pkg
Each release of the former PkgBuild got a new thread, which is probably disagreeable to the mods and others. Over the last year PkgBuild/src2pkg has picked up quite a few users apparently and gets mentioned in other peoples threads. This meany I'm less worried about 'promoting' my work. But when I have something good going that's cost me lots of time, I do try to let it be known -I only learn these things by studying/extending the work of others who took a little time to talk about their work as well as getting it done.
PkgBuild had quite a lot of documentation, but over the last year there have been so many fundamental changes that I finally threw out all the original documenatation. Writing any docs is excruciating work and each one-line feature of code may need 10-1000 pages to really explain it to everyone. Writing documents that address the needs of both advanced users and beginners is a nightmare. And when you've polished all that up and amuse yourself by doing a little real coding you usually have a new idea or finally work out some problem and suddenly all that documentation is not accurate anymore.
Same thing goes for the webpage, even worse because of formatting, etc. I mention this on my home page in fact. Even correspondence with contributors can cost you more time than it saves you. But let me stress that this is not always true -I'm especially thankful to tuxdev for his suggestions, feedback and small code contributions which have all been given in good spirit and in a non-bothering fashion. Kudos! tuxdev


All times are GMT -5. The time now is 11:31 AM.