Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-18-2010, 05:19 PM   #1
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31

Rep: Reputation: 16
Best way to find programs not installed by a package manager

Hi peeps,

I am trying to think of the best way to find packages that have been installed by NOT using a package manager.

To find installed packages one would search rpm or pkg DB, but what if the software was installed by a tarball or bin or even compilled.

Anyone got any suggestions on how to script for these, I was hopeing to write a script to find all the third party stuff, I iknow there will be a lot of stuff that gets picked up so what is the best way to get minimise false positves?

Any ideas welcome.
Old 02-18-2010, 06:23 PM   #2
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532Reputation: 3532
The real problem lies in "third party stuff" (which is kind of vague a definition), what the FSSTND / FHS / LSB suggests one should do and how a system is actually managed ("let's dump everything in /srv anyway"). For RH.*L and derivatives a 'find /path/ -type f -print0|xargs -0 -iX rpm -qf 'X' |awk '/not owned/ {print $2}';' could be a start, AFAIK that's 'dpkg -S' for Debian and derivatives. Systems where package management can't even list package contents will obviously s*ck major as you will have no basis to work from whatsoever.
Old 02-18-2010, 06:26 PM   #3
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Well, you can install slocate. With slocate, after installation you can run "updatedb", and then "locate <application name>".
0 members found this post helpful.
Old 02-18-2010, 06:26 PM   #4
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
I think if the software wasn't installed via some utility you have to keep track of it yourself. That's part of why people use package managers.

You could just look in your bin dirs and see what's there. Maybe grep -v it against output from your package manager to just see what wasn't installed via the manager.

[Edit: Also, yeah if you just want to find out if a certain package is installed (as opposed to getting a list of all packages that were installed without a manager) locate should do the trick]

Last edited by mattca; 02-18-2010 at 06:28 PM.
Old 02-18-2010, 06:35 PM   #5
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Slackware has
which will create a package from the source file.
Then you can use the packagemanager to install.
Don't know for other distro's though
Old 02-18-2010, 09:50 PM   #6
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31

Original Poster
Rep: Reputation: 16
I know slocate and find quite well, and guessed I hoped for a solution that I may have overlooked.

The problem is I managee several linux servers, and wanted to be able to proivde lists of all the installed software, rpm -qa etc works well for software installed via an RPM but for those odd little besoke packages that some company 10 years ago provided a gz or even zip installer for gets left out, I hope most packages are instlled in the opt dir but you can never be sure.

I could check for files in /bin /sbin etc... and then find what proveds etc but it would take some time to run.
Old 02-19-2010, 05:07 AM   #7
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
For new "packages", suggest : use a tool like checkinstall
to create an rpm package.

For all programs available as an SRC RPM source, use rpmbuild.
That would be the most common 15,000 to 20,000 programs.
Or write your own spec file to be used by rpmbuild.
Old 02-19-2010, 06:41 AM   #8
Registered: Oct 2009
Location: England
Distribution: *buntu, Vector
Posts: 499

Rep: Reputation: 102Reputation: 102
In general, I guess best way is to make the package manager spit out a list of what it installed, compare that to a directory listing, and show what is in the latter but not the former.
You could do it for the obvious places (namely, the directories in root's $PATH ), or do it for everywhere. (Well, all of /bin, /lib, /sbin, /usr, /var, and /opt )
Old 02-19-2010, 07:21 AM   #9
Registered: Feb 2010
Location: usa:/dev/random
Distribution: Slackware, Salix
Posts: 237

Rep: Reputation: 59
Depending on how may packages you are dealing with, you could go back to a build tree and see where "make install" puts things.

I think this is why hand-compiled and installed packages usually default to /usr/local.


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
applications appearing in package manager as installed but not starting... Siljrath Linux - Newbie 1 12-03-2009 02:35 PM
Programs installed with package manager aren't recognised by other programs fraserm Linux - Software 3 04-21-2007 01:38 PM
RPM package manager says package needs to be installed. But I already installed it! nick623 Linux - Software 2 05-24-2005 03:15 AM
cant find installed programs Skankin Pickle Linux - Newbie 5 08-30-2004 12:59 PM
Can't find where my programs are been installed to??? Stevetgn Linux - Newbie 4 02-06-2004 06:15 PM

All times are GMT -5. The time now is 12:18 PM.

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