You are not logged in.

#1 2011-05-17 20:05:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

remove all but base and base-devel [solved]

Is there a simple method I can use to remove all but the base/base-devel (and openssh, sudo + a few other deamons packages) without going through the several hundred packages I have installed on my system?  I want to abandon everything I have on the box and start fresh without wiping the drive and conf files.

Thanks!

Last edited by graysky (2011-05-17 21:25:11)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2011-05-17 20:13:01

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: remove all but base and base-devel [solved]

pacman -R $(pacman -Qq | grep -ve "$(pacman -Qqg base)" -ve "$(pacman -Qqg base-devel)")

You might have to enable -dd (skip all dependency checks).

To get an idea of what will be removed, run this and have a look at foobar.txt:

echo $(pacman -Qq | grep -ve "$(pacman -Qqg base)" -ve "$(pacman -Qqg base-devel)") | tr ' ' '\n' > foobar.txt

Regards,
demian

P.S.: I should totally do this too. My root partition is almost full tongue.

Last edited by demian (2011-05-18 16:39:46)


no place like /home
github

Offline

#3 2011-05-17 21:23:15

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

Re: remove all but base and base-devel [solved]

comm -23 <(pacman -Qq) <(pacman -Qqg base base-devel | sort)

will give you a list of files that are neither in base nor in base-devel so e.g.

pacman -Rns $(comm -23 <(pacman -Qq) <(pacman -Qqg base base-devel | sort)

could be a good start. You will get a bunch of

error: failed to prepare transaction (could not satisfy dependencies)
:: foo: requires bar

but it's doable.

Offline

#4 2011-05-17 21:24:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: remove all but base and base-devel [solved]

Nice, thanks guys.  I have the box nice and minimized with lxde now.

https://wiki.archlinux.org/title/Pacman … l_packages

Last edited by graysky (2021-12-11 17:44:45)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB