LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-16-2006, 02:41 AM   #1
s4006576
LQ Newbie
 
Registered: Dec 2003
Posts: 10

Rep: Reputation: 0
List of Installed Programs not in pkgtool


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.
 
Old 08-16-2006, 03:30 AM   #2
kd5pbo
Member
 
Registered: Jun 2006
Location: Washington, DC, USA
Distribution: Slackware
Posts: 41

Rep: Reputation: 15
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.
 
Old 08-16-2006, 04:54 AM   #3
Eternal_Newbie
Member
 
Registered: Jun 2005
Location: The Pudding Isles
Distribution: Slackware 13.37
Posts: 573

Rep: Reputation: 59
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.
 
Old 08-16-2006, 05:00 AM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
Just keep the source code of installed programs in a directory and don't delete it. That way you'll know what you've installed and what you haven't.
 
Old 08-16-2006, 05:39 AM   #5
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
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.
 
Old 08-16-2006, 08:19 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,768

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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:

http://distro.ibiblio.org/pub/linux/...6.3-i486-2.tgz

http://distro.ibiblio.org/pub/linux/...2-noarch-1.tgz

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.
 
Old 08-16-2006, 08:23 AM   #7
notlob
LQ Newbie
 
Registered: Dec 2005
Distribution: Slackware 10.2
Posts: 4

Rep: Reputation: 0
Quote:
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).
 
Old 08-16-2006, 09:15 AM   #8
notlob
LQ Newbie
 
Registered: Dec 2005
Distribution: Slackware 10.2
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by notlob
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".
 
Old 08-16-2006, 10:28 AM   #9
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,524

Rep: Reputation: 94
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List installed Programs philthee Linux - General 8 10-07-2005 03:35 PM
saving list of installed programs DAChristen29 Ubuntu 1 08-28-2005 04:58 PM
How to get newly installed programs in programs list Brosky Linux - Software 5 02-06-2004 03:45 PM
Where is the file:lists all installed pkg's-like 'pkgtool-view'? BearClaw Slackware 2 07-19-2003 10:06 AM
list of programs I have ole Linux - Newbie 5 03-17-2003 08:20 PM


All times are GMT -5. The time now is 10:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration