How do I remove all packages except for the ones in the `base` and `base-devel` groups?


(Gerard) #1

It dawned on me that you really removed everything except base and base-devel… I didn’t go that far, because it includes removing the desktop and everything too…

I have been reading up in the pacman manual trying to figure out how to remove everything in one command except specified groups… couldn’t see it, and don’t think it’s good to use the gui…
Can you help me with this or give a clue, if there is such a command? After that I know what to do! (hope this doesn’t stray too far from the subject)


Spell check Dutch can't seem to work
(tom) #2

do it on our bug tracker with “package request” in the title.

klick on the green “new issue” botton and select a repository

i was a adventure to do this^^

  1. list all packages in a group and pass thy in a file
#sort because some packages together in diffrent groups and so you can delete they
pacman -Qqg > | sort > packages
  1. edit this file
    2.1 from
base-devel which
frameworks baloo
frameworks kfilemetadata
plasma breeze

2.2 to

<delet lines for packages to keep>
sudo pacman -R baloo
sudo pacman -R kfilemetadata
sudo pacman -R breeze

2.3 make it executable and execute
3. set up a lean and clean system

perhaps was hunspell the reason for our problem

(Gerard) #3

Thank you so much!! I think I can do this (all) even this week - I like to have some time for these things, because I am still pretty sure I will learn some new things too…

I already figured that it would involve more than one line… It’s kinda funny, but I think it’s true that always working from a gui destroys commandline skills eventually, and even hampers ones ability to come up with a proper solution sometimes.

Am I allowed to blame Microsoft for getting me hooked on gui’s, slowly degrading commandline skills and such - I mean, I was pretty good in DOS, then came Windows… :rofl:

(tom) #4

be sure you know the necessery packages for reinstall :wink:
…and i wouldn’t remove networkmanager with dhcpcd and wpa_supplicant :wink:

(Gerard) #5

I wouldn’t do that of course… I think I would have hit myself making that mistake lol

I’ll be sure to check out the other link you posted! :sunglasses:

(tom) #6

there is a much simpler way to do find packages thy are in a repository

sudo pacman -S `pacman -Qqn`

to avoid file conflicts

sudo pacman -S --overwrite `pacman -Qqn`