You are not logged in.

#1 2016-10-30 23:31:57

kinkinkijkin
Member
Registered: 2014-07-15
Posts: 30

Any way to remove every package with a certain string in its name?

As title says

I installed amdgpu-pro without thinking and it overwrote a ton of libraries

I'd like to go back to amdgpu and mesa, how would I uninstall all of amdgpu-pro (using only pacman)?

Offline

#2 2016-10-31 00:59:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,522
Website

Re: Any way to remove every package with a certain string in its name?

If one of these was a top level package for which the others were dependencies, simply remove the top-level package with the -Rsn.

Otherwise, a more direct answer to your question: pacman -Rsn $(pacman -Qs amdgpu-pro)

Of course if it's really just a mater of fixing the libs that were replaced, just install the ones you actually want.  Pacman will detect any conflicts and you can confirm that you want to remove any conflicting amdgpu-pro packages.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-10-31 01:04:11

kinkinkijkin
Member
Registered: 2014-07-15
Posts: 30

Re: Any way to remove every package with a certain string in its name?

Trilby wrote:

Pacman will detect any conflicts and you can confirm that you want to remove any conflicting amdgpu-pro packages.

last time I tried, pacman complained that files were already installed, by the packages that were being replaced

so thank you

Offline

#4 2016-10-31 01:23:13

kinkinkijkin
Member
Registered: 2014-07-15
Posts: 30

Re: Any way to remove every package with a certain string in its name?

Actually I just tried it and it tries to uninstall every line and word within every line of the -Qs

are there any other ways?

Offline

#5 2016-10-31 01:37:49

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Any way to remove every package with a certain string in its name?

take a look at what pacman -Qqs does

Offline

#6 2016-10-31 01:40:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,522
Website

Re: Any way to remove every package with a certain string in its name?

Sorry about that - I did mistype that part, it should be Qqs.  But your previous post made it sound like you were going with the other approach of just installing the packages you wanted.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB