You are not logged in.

#1 2012-02-12 22:10:41

geoffm
Member
Registered: 2012-01-15
Posts: 30

can we use wildcards in pacman?

Is there a way to make pacman install all packages beginning with a certain string?
For exemple:

pacman -S kdeplasma-addons* 

would install all packages starting with "kdeplasma-addons"
I'm actually surprised this doesn't work. I looked in the documentation but I don't find anything,

Last edited by geoffm (2012-02-12 22:11:47)

Offline

#2 2012-02-12 22:21:28

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,109
Website

Re: can we use wildcards in pacman?

No, but something like this will work:

pacman -Ssq <regex> | sudo pacman -S -

also related: https://bugs.archlinux.org/task/1561

Offline

#3 2012-02-12 22:22:01

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: can we use wildcards in pacman?

Why don't you simply install kdeplasma-addons or kde-meta-kdeplasma-addons?

Last edited by desm0tes (2012-02-12 22:22:37)

Offline

#4 2012-02-12 22:22:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: can we use wildcards in pacman?

Try

pacman -S $(pacman -Ssq kdeplasma-addons*)

Offline

#5 2012-02-13 21:38:11

viking60
Member
From: Valhalla
Registered: 2010-08-02
Posts: 95
Website

Re: can we use wildcards in pacman?

Or

pacman -S $(pacman -Qq | grep kdeplasma-addons*)

"Common sense is not common"

Offline

#6 2012-02-13 21:46:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: can we use wildcards in pacman?

viking60 wrote:

Or

pacman -S $(pacman -Qq | grep kdeplasma-addons*)

This won't work. OP doesn't want to reinstall them.

[karol@black ~]$ pacman -S $(pacman -Qq | grep kdeplasma-addons*)
error: no targets specified (use -h for help)

Last edited by karol (2012-02-13 21:47:10)

Offline

#7 2012-02-13 22:04:05

viking60
Member
From: Valhalla
Registered: 2010-08-02
Posts: 95
Website

Re: can we use wildcards in pacman?

Ah yes I stand corrected !  - It's great for removing them again though:

pacman -Rns $(pacman -Qq | grep kdeplasma-addons*)

smile


"Common sense is not common"

Offline

#8 2012-02-13 22:11:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: can we use wildcards in pacman?

Sure, but

pacman -Rns kdeplasma-addons

should work too.


I think falconindy posted the best general way of doing this.

Offline

#9 2012-02-13 22:25:28

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: can we use wildcards in pacman?

karol wrote:

Sure, but

pacman -Rns kdeplasma-addons

should work too.

This should work only, when he initially installed the package group, as I suggested, instead of installing the individual packages...at least that's the case for metapackages.

Offline

#10 2012-02-13 22:32:43

viking60
Member
From: Valhalla
Registered: 2010-08-02
Posts: 95
Website

Re: can we use wildcards in pacman?

karol wrote:

Sure, but

pacman -Rns kdeplasma-addons

should work too.


I think falconindy posted the best general way of doing this.

Sure he is the guru.
The simple -Rns will often get you into a dependency hell - I learned that when removing all gnome-shell* . So there is a difference when using the wildcard AFAICT.

Last edited by viking60 (2012-02-13 22:39:29)


"Common sense is not common"

Offline

Board footer

Powered by FluxBB