LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Checking to see whether a package is already installed (http://www.linuxquestions.org/questions/slackware-14/checking-to-see-whether-a-package-is-already-installed-4175443586/)

tstamp 12-31-2012 10:44 AM

Checking to see whether a package is already installed
 
Before downloading dependencies I might already have, how can I check to see if I already have them?

hitest 12-31-2012 10:59 AM

Just launch # pkgtool
Then you can browse through and see what is installed on your system.

dr.s 12-31-2012 11:00 AM

You can run a slackpkg search with the package name you're interested in.

Quote:

# slackpkg search subversion

Looking for subversion in package list. Please wait... DONE

The list below shows all packages with name matching "subversion".

[ installed ] - subversion-1.7.6-x86_64-1

You can search specific files using "slackpkg file-search file".

sycamorex 12-31-2012 11:00 AM

...or
Code:

ls /var/log/packages | grep name_of_package

fadein 12-31-2012 07:23 PM

I like to avoid the extra process and just let the shell filter the list for me:
Code:

ls /var/log/packages/*name_of_pkg*

drumz 01-04-2013 12:05 AM

I added the following to my ~/.bashrc

Code:

alias lsp='ls /var/log/packages'
alias lspg='lsp | grep'

So I can do the following:

Code:

$ lspg gcc
gcc-4.7.1-x86_64-1
gcc-g++-4.7.1-x86_64-1
gcc-gfortran-4.7.1-x86_64-1
gcc-gnat-4.7.1-x86_64-1
gcc-go-4.7.1-x86_64-1
gcc-java-4.7.1-x86_64-1
gcc-objc-4.7.1-x86_64-1
gccmakedep-1.0.2-noarch-2



All times are GMT -5. The time now is 04:17 AM.