LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2021, 03:17 PM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
pacman and yay search - returned result is overwhelming.. most of them don't even have the string that i tried to search.


Did a yay package search for Tor browser, the result returned is overwhelmingly too many.. but many of the package does not even have tor in it, why is it like this ?
Is there way to do a package search when the result is too many ? i have faced several time, not knowing how to locate a package, because simply too many returned result, and most of them is not what i want to look for.

Code:
 $ yay -Ssq tor
...
nano
mdadm
libsecret
libldap
libedit
bison
b43-fwcutter
 -> error during AUR search: status 200: Too many package results.
 -> Showing repo packages only
did the same search using pacman.. and the result is also a lot..
Code:
$ pacman -Ssq tor
lib32-libappindicator-gtk2
lib32-libappindicator-gtk3
lib32-libindicator-gtk2
lib32-libindicator-gtk3
lib32-libldap
lib32-libwrap
lib32-lm_sensors
lib32-pipewire-v4l2
lib32-procps-ng
lib32-sni-qt
zsnes
 
Old 12-29-2021, 04:51 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Make a little effort.

Code:
pacman -Si tor
https://archlinux.org/packages/?q=tor

https://archlinux.org/packages/community/x86_64/tor/

https://github.com/archlinux/svntogi...ages/tor/trunk

https://www.torproject.org/

https://github.com/archlinux/svntogi...trunk/PKGBUILD

Edit:
Also
Code:
pacman -Si torbrowser-launcher

Last edited by teckk; 12-29-2021 at 04:53 PM.
 
Old 12-30-2021, 03:17 AM   #3
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
If I understand the question correctly, one may use regex:

Code:
pacman -Ss '^tor'
gives me just five results:

Code:
~ $ pacman -Ss '^tor'
community/python-threadloop 1.0.2-6
    Tornado IOLoop Backed Concurrent Futures
community/tor 0.4.6.9-1
    Anonymizing overlay network.
community/torbrowser-launcher 0.3.5-4
    Securely and easily download, verify, install, and launch Tor Browser in Linux
community/torrential 1.1.0-5
    Simple BitTorrent client for Pantheon
community/torsocks 2.3.0-2
    Wrapper to safely torify applications
  ~ $
I don't know how to search only names and not descriptions.
 
1 members found this post helpful.
Old 12-30-2021, 03:21 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by hish2021 View Post
I don't know how to search only names and not descriptions.
Code:
pacman -Ss '^tor-'
 
Old 12-30-2021, 03:29 AM   #5
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Code:
pacman -Ss '^tor-'

Quote:
Sometimes, -s's builtin ERE (Extended Regular Expressions) can cause a lot of unwanted results, so it has to be limited to match the package name only; not the description nor any other field:
From: https://wiki.archlinux.org/title/pacman

But
Code:
pacman -Ss '^tor-'
comes back empty!

Last edited by hish2021; 12-30-2021 at 03:31 AM.
 
Old 12-30-2021, 03:48 AM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
TBH, I just looked it up in the wiki page you quoted. Then
Code:
pacman -Ss '^tor$'
I never used Arch so cannot test it, but it works for pacman in MSYS2 on Windows.

Last edited by shruggy; 12-30-2021 at 03:50 AM.
 
Old 12-30-2021, 04:06 AM   #7
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
TBH, I just looked it up in the wiki page you quoted. Then
Code:
pacman -Ss '^tor$'
I never used Arch so cannot test it, but it works for pacman in MSYS2 on Windows.
That works but the wiki page doesn't have it perhaps because names like "torbrowser-launcher" and "torsocks" would be excluded.

Anyway, the Arch wiki can't be wrong so I'll keep digging.
 
Old 12-30-2021, 01:21 PM   #8
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
Make a little effort.

Code:
pacman -Si torbrowser-launcher
Never cross my mind that some packages name needed to search from internet for it before punch into package manager search.
I Literately thought that i can find any package just by typing name into yay, and grep it to my desired package.

Isn't that a bit...detouring to search for the package name from internet and then copy and paste it to package manager search ? ***just my thought**
Since i have to search the "unexpected package name" from internet, might well i just grab it from the author website ?

Ya, so i know now that i can try out some of these... "globbing" keys... with only this yield less than 5 result, which is good enough.. However, without searching from internet, sometime might still need to do guess in order for the package manager to return usable result.
$ pacman -Ss '^tor'


Thanks.. learnt how to user package manager to locate package that come with "no so direct name".
 
Old 01-03-2022, 07:33 PM   #9
MeCrumbly429
LQ Newbie
 
Registered: Jul 2020
Location: East hill-meridian, Renton, WA
Distribution: Arch Linux, Slackware -current, CRUX Linux
Posts: 26

Rep: Reputation: Disabled
In a pinch, you could also pipe the output of a search into grep with the following command:
Pacman -Ss <QUERY> | grep <QUERY>

Grep is your friend :)
 
Old 01-04-2022, 07:53 AM   #10
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MeCrumbly429 View Post
In a pinch, you could also pipe the output of a search into grep with the following command:
Pacman -Ss <QUERY> | grep <QUERY>

Grep is your friend
Ya, i did that too, but it does not work because the end result is exactly the same. and the result of that search was hundreds..
it is the regex that able to narrows it down as what @hish2021 suggested.
If in case not sure what the the exact package name, then need to do search on http arch package search.

I have got it.

Thx






Code:
$ pacman -Ssq tor | grep ^tor
tor
torbrowser-launcher        <---- 
torrential
torsocks
Code:
$ pacman -Ssq ^tor
python-threadloop
tor
torbrowser-launcher    <---
torrential
torsocks
 
Old 01-04-2022, 08:33 AM   #11
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
https://wiki.archlinux.org/title/Pacman/Tips_and_tricks
 
1 members found this post helpful.
Old 01-05-2022, 12:44 AM   #12
MeCrumbly429
LQ Newbie
 
Registered: Jul 2020
Location: East hill-meridian, Renton, WA
Distribution: Arch Linux, Slackware -current, CRUX Linux
Posts: 26

Rep: Reputation: Disabled
Quote:
Originally Posted by andrewysk View Post
Ya, i did that too, but it does not work because the end result is exactly the same. and the result of that search was hundreds..
it is the regex that able to narrows it down as what @hish2021 suggested.
If in case not sure what the the exact package name, then need to do search on http arch package search.

I have got it.

Thx






Code:
$ pacman -Ssq tor | grep ^tor
tor
torbrowser-launcher        <---- 
torrential
torsocks
Code:
$ pacman -Ssq ^tor
python-threadloop
tor
torbrowser-launcher    <---
torrential
torsocks
Sorry, forgot to elaborate on that. Grep would only be a viable solution if you want a nested query, per se (for instance, pacman -Ss tor | grep browser).
However, this is pretty clunky, and is, in hindsight, a novelty solution.
I’m very sorry to have messed up there, I’m still kind of a klutz in the Linux world
 
Old 01-05-2022, 07:41 AM   #13
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MeCrumbly429 View Post
Sorry, forgot to elaborate on that. Grep would only be a viable solution if you want a nested query, per se (for instance, pacman -Ss tor | grep browser).
However, this is pretty clunky, and is, in hindsight, a novelty solution.
I’m very sorry to have messed up there, I’m still kind of a klutz in the Linux world
I believe it is no harm for anyone with good intention of trying to help out, So, ya..it is ok. Thx

Btw, The main issue with me in this thread was, i don't even know tor browser package name.. hence i was thinking tor package should be "tor".. if it have known that tor browser will be call tor-browser, i would have searched for "tor.*browser".
The 2nd reason why i failed at it because i have forgotten to use regex in the search (i have never use regex in pacman before.. this is first time.. so ya. this issue will not occur for me anymore in the future..

Consider it lesson learnt and solved. Thx
 
  


Reply



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
LXer: Deb-pacman : A Pacman-style Frontend For APT Package Manager LXer Syndicated Linux News 1 12-09-2019 05:21 PM
Why do we need pacman-key if pacman checks md5? Mr. Alex Arch 5 03-09-2012 05:05 PM
Anyone else 'pacman -Sy' instead of simply 'pacman -S'-ing packages? Kenny_Strawn Arch 15 03-23-2011 01:09 PM
difference between socket returned descriptor and accept returned descriptor naveenisback Programming 1 08-29-2009 04:55 AM
I have tried and tried, I really have! Ewen Linux - General 13 01-14-2003 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration