You are not logged in.
One liner on the wiki gives dep errors for me. Thoughts?
My goal is to remove everything but the base group.
# pacman -Rs $(comm -23 <(pacman -Qeq) <(pacman -Qgq base))
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: acl: requires attr>=2.4.46
:: coreutils: requires pam
:: libcap: requires attr
:: libmediainfo: requires curl
:: libusb-compat: requires libusb
:: logrotate: requires cron
:: shadow: requires pam
:: usbutils: requires libusb
Last edited by graysky (2011-11-12 15:45:59)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
e.g. pam is not in 'base' group but it's required by e.g. coreutils, which are in 'base' group.
Try
for i in $(pacman -Qqg base); do pactree -ul $i >> base1; done
and
pacman -Rs $(comm -23 <(pacman -Qeq|sort) <(sort -u base1|cut -d ' ' -f 1))
Offline
e.g. pam is not in 'base' group but it's required by e.g. coreutils, which are in 'base' group.
Tryfor i in $(pacman -Qqg base); do pactree -ul $i >> base1; done
and
pacman -Rs $(comm -23 <(pacman -Qeq|sort) <(sort -u base1|cut -d ' ' -f 1))
The last comand works flawlessly.
Last edited by Shark (2011-11-12 15:42:33)
If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau
Registered Linux User: #559057
Offline
I actually nuked my chroot and rebuilt so I'm reluctant to try it Shark - since you have established that it worked, would you update the wiki page?
Thanks karol as usual
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
karol wrote:e.g. pam is not in 'base' group but it's required by e.g. coreutils, which are in 'base' group.
Tryfor i in $(pacman -Qqg base); do pactree -ul $i >> base1; done
and
pacman -Rs $(comm -23 <(pacman -Qeq|sort) <(sort -u base1|cut -d ' ' -f 1))
The last comand works flawlessly.
About the error you posted a second ago, both commands work for me, but I've just remembered I'm using pacman 4 ;P
Notes:
1. comm requires sorted input otherwise you get e.g. 'comm: file 1 is not in sorted order' error.
2. pactree prints the package name followed by what it provides e.g.
[karol@black ~]$ pactree -lu logrotate
logrotate
popt
glibc
linux-api-headers
tzdata
dcron cron
bash
readline
ncurses
gzip
Here it's the 'dcron cron' line.
[karol@black ~]$ sudo pacman -Rs $(comm -23 <(pacman -Qeq|sort) <(sort -u base1))
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: logrotate: requires cron
If we keep just 'dcron', things seem to work.
@graysky
It's safe to try, you'll get a prompt:
Total Removed Size: 1370,77 MiB
Do you want to remove these packages? [Y/n]
Answer 'n' and you're fine.
======== Edit ========
Maybe the second command should be
pacman -Rs $(comm -23 <(pacman -Qq|sort) <(sort -u base1|cut -d ' ' -f 1))
The first bracket now has 'pacman -Qq' instead of 'pacman -Qeq', in case you have some package that's 'Installed as a dependency for another package' but not actually required by any.
The proper way of fixing such situation is
pacman -D --asexplicit <packagename>
======== Edit 2 ========
Oneliner w/o a temp file:
pacman -Rs $(comm -23 <(pacman -Qeq|sort) <((for i in $(pacman -Qqg base); do pactree -ul $i; done)|sort -u|cut -d ' ' -f 1))
Last edited by karol (2011-11-12 16:09:07)
Offline
I have edited the wiki. https://wiki.archlinux.org/index.php/Pa … base_group
It is my first edit of wiki. I hope i did right.
Last edited by Shark (2011-11-12 16:09:14)
If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau
Registered Linux User: #559057
Offline
Edited your edit so it uses this oneliner w/o a temp file:
pacman -Rs $(comm -23 <(pacman -Qeq|sort) <((for i in $(pacman -Qqg base); do pactree -ul $i; done)|sort -u|cut -d ' ' -f 1))
I'll add the notes explaining what's being done in a minute.
Offline