SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If this has already been addressed please point me in the right direction.
So far, I have installed most of my programs using "./configure && make && make install". Now I've mostly forgotten what I've put into my slack box. How can I find out? These programs shouldn't be in pkgtool since I didn't install using packages.
Also, if I want to remove these rarely-used programs, how can I make sure that I have removed every file it came with that is not used by other programs?
Ay easy way out for this problem of mine? Thanks in advance.
I guess the obvious way to find out what you can run is to open a bash shell and hit tab a couple of times. Of course, the list will be long, but it will be complete.
That is assuming you installed them somewhere in your path, which is usually the case.
The easiest way of uninstalling, when there is a 'make uninstall' target, is probably to tar the build directory and keep it for future use. This can get unweildy, though. If there is no 'make uninstall' target, you have to remove by hand.
In either case if you don't note down dependencies when you notice them, then it is pretty much hit and miss when removing programs by hand.
Last edited by Eternal_Newbie; 08-16-2006 at 05:08 AM.
In the future, you could use 'checkinstall' instead of 'make install'. Checkinstall is in slackware /extra, and it will package the software up for you.
Unfortunately, even make uninstall won't always remove everything that make install installs. Also if you move or rename the source directories then make uninstall won't work. You also don't have any way of knowing if a file is needed by other programs unless you analyze each file against every other installed program.
I'd suggest you try my PkgBuild program which uses installwatch to track installations and creates very good slackware-type packages. And you won't usually have to do any script writing. By starting the build with the 'src2pkg' command it will write them for you!
Be sure to install installwatch-0.6.3 first, then pkgbuild. You can get them here:
Using pkgbuild has many advantages over checkinstall including 'intelligent' building, no lost files and it doesn't actually install the package by default, unless you tell it to. PkgBuild will let you do lots of special stuff with your packages as well if you want.
Also, if I want to remove these rarely-used programs, how can I make sure that I have removed every file it came with that is not used by other programs?
Each file that belongs to a package is registered somewhere in /var/log/packages. The following little script checks if a file belongs to a package. If no package is found, the file might belong to one of your programs.
Code:
#!/bin/sh
filename=$1
filename_re=${filename:1}
filename_re=${filename_re//[/\\[}
pkgs=`grep -l ^$filename_re$ /var/log/packages/*`
if [ "$pkgs" = "" ] ; then
echo "- $filename : no package found"
else
for pkg in $pkgs; do echo "+ $filename : $pkg"; done
fi
Save the script as "findpkgs" and make it executable.
Example 1.
Code:
gast$ findpkgs /usr/sbin/adduser
+ /usr/sbin/adduser : /var/log/packages/shadow-4.0.3-i486-11
gast$ findpkgs /usr/sbin/foobar
- /usr/sbin/foobar : no package found
Example 2.
Combine the script with find and grep to find files in /usr/sbin/ (for example) that might belong to your programs:
Code:
gast$ find /usr/sbin -type f -exec ./findpkgs {} \; | grep "^-"
- /usr/sbin/bonnie++: no package found
- /usr/sbin/zcav: no package found
Don't remove the files immediately! Check owners, groups, permissions and dates at first. If you are sure, they belong to one of your programs, you can backup and remove them (together with empty directories and symbolic links).
Each file that belongs to a package is registered somewhere in /var/log/packages.
Not always, as it seems. "bin/bash" is not listed in "/var/log/packages/bash-3.0-i486-4" -- there is a "bin/bash2.new" instead, which is copied to "/bin/bash" during installation by "doinst.sh".
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645
Rep:
Quote:
Originally Posted by notlob
Not always, as it seems. "bin/bash" is not listed in "/var/log/packages/bash-3.0-i486-4" -- there is a "bin/bash2.new" instead, which is copied to "/bin/bash" during installation by "doinst.sh".
Just extend the search to all files in /var/log/scripts -- this should show all symlinks and renamed files as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.