Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 07-08-2007, 06:26 PM   #1
Registered: Jul 2007
Location: Bucharest, Romania
Distribution: Ubuntu 7.04, Slackware 12
Posts: 87

Rep: Reputation: 15
How to find out if you have a specific package installed?

What is the command? For example......... check if you have python.

$ whereis python

Old 07-08-2007, 06:28 PM   #2
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
which python if you are looking for the binary
ls /var/log/packages/ if you are looking for the package
Old 07-08-2007, 11:58 PM   #3
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 303

Rep: Reputation: 47
bash-3.1$ ls /var/log/packages/ |grep python

I put the following lines into $HOME/.bashrc, so every time I only need to do "spkg xxx" (partial name is working too) to see whether a package is installed or not (note: I am a newbie to shell scripting):

##### A simple package search script #####
##### for installed slackware packages ######
spkg() {
read keyword
echo "+==========================+"
echo "|Here is the search result:|"
echo "+==========================+"
ls /var/log/packages |grep $1 
if [ $? -eq 1 ]
echo "The package(s) NOT FOUND"


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
pkg-config can't find installed package JAKK Slackware 16 08-11-2008 10:07 AM
How to find if package is installed Redbone981sl Ubuntu 4 01-23-2007 07:03 PM
installed firefox package on slackware 10.0, i can't find it salviadud Slackware 10 03-04-2005 10:22 PM
How to find the complete path of an installed package samik Linux - Newbie 1 10-26-2003 03:19 PM
Can't find package Red Hat Update Agent installed poison5151 Linux - Software 4 04-12-2003 12:40 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:55 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