You are not logged in.
I will post this with an example:
I have installed package X with "pacman -S X". X have 2 dependencies: Y and Z, so pacman has installed X, Y, Z.
I have installed another package called A with "pacman -S A", A have one dependencies, B, so pacman installed A and B.
If I run "pacman -Q", it outputs:
A
B
X
Y
Z
And I want to know, if I run a command, outputs this:
A
X
the packages that has been installed with my pacman commands, not de dependencies packages. Is there any way to do this?
Greetings
Only deaths can see the end of battles.
Blog: http://djmartinez.co.cc -> The life of a Computer Engineer
Offline
pacman -Qi curl | grep 'Install Reason'
might work ... it's hard to tell though
Offline
pacman -Qe
It only now does this with pacman 3, though. ('e' is for 'explicit')
Offline
@ataraxia:
Pacman v3.0.4
-e, --orphans list all packages installed as dependencies but no longer
required by any package
:?:
Last edited by samlt (2007-06-01 19:03:16)
Offline
Argh, I already forgot what pacman 2 did (I was looking at this option recently).
In any cases, the -e option in pacman 3 now correctly lists orphans, and that's what this option was supposed to do.
It's supposed to tell you which packages are totally useless / unused on your machines so you can remove them if you want.
There might be a need for listing explictly installed packages, but that's not implemented. Though, you can do it easily with little scripts :
http://bbs.archlinux.org/viewtopic.php? … 08#p251008
Edit :
So, for the record :
pacman2 -Qe listed all explicitly installed packages not required by any others
pacman3 -Qe lists all packages installed as deps not required by any others (real orphans in my opinion)
And maybe a new option will appear in pacman 3 ( http://bugs.archlinux.org/task/7208 ) :
pacman3 -Qee which lists any packages (installed explicitly or as dep) not required by any others.
The pacman2 option doesn't mean anything for me, I don't see what it represents, and how it could be useful.
But there could be an option for listing all explicitly installed packages (some people might want this list for reinstalling), which can in the meantime be replaced by scripts, like the ones above.
I didn't see this feature request (maybe I missed it though), so check again, and request it if you want : http://bugs.archlinux.org
Last edited by shining (2007-06-01 21:58:28)
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
You're right. I got confused and gave the wrong answer.
Offline
You're right. I got confused and gave the wrong answer.
I've to admit it's easy to get confused
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
pacman eats my brains sometimes.
(Must be zombie-pacman! "pac-pac-pac-braaaiiins... pac-pac-pac-braaaiiins..." )
Offline
just use: yaourt -Qd :-)
Offline
Oh, indeed, it seems like yaout supports that.
Though, it looks to me there is an error in the description :
(-Q, --query) -e, list all packages explicitly installed
(-Q, --query) -d, list all packages installed as a dependency for another package
and are not required by any other packages
(-Q, --query) -t * search for missed installed orphans
If I read correctly, it should be :
(-Q, --query) -e, list all packages explicitly installed
(-Q, --query) -d, list all packages installed as a dependency for another package
(-Q, --query) -t * search for missed installed orphans
(packages installed as a dependency for another package
and are not required by any other packages)
Having e for explicit, d for dependency, and so another letter for orphans, that's not stupid imo.
I wonder if I wouldn't prefer to have pacman working that way too
By the way, yaourt -Qd and -Qe options are similar to the script I wrote, and are very slow.
Any idea why the find way is much much faster? Is it possible to get the same performance without find in sh ?
Though implementing these options directly in pacman would probably solve that problem
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Oh, indeed, it seems like yaout supports that.
Though, it looks to me there is an error in the description :(-Q, --query) -e, list all packages explicitly installed (-Q, --query) -d, list all packages installed as a dependency for another package and are not required by any other packages (-Q, --query) -t * search for missed installed orphans
If I read correctly, it should be :
(-Q, --query) -e, list all packages explicitly installed (-Q, --query) -d, list all packages installed as a dependency for another package (-Q, --query) -t * search for missed installed orphans (packages installed as a dependency for another package and are not required by any other packages)
Having e for explicit, d for dependency, and so another letter for orphans, that's not stupid imo.
I wonder if I wouldn't prefer to have pacman working that way tooBy the way, yaourt -Qd and -Qe options are similar to the script I wrote, and are very slow.
Any idea why the find way is much much faster? Is it possible to get the same performance without find in sh ?Though implementing these options directly in pacman would probably solve that problem
You are right, "(-Q, --query) -d, list all packages installed as a dependency for another package" ! that's an error in help :-D
Fixed in next release.
Your code is much better for searching package !
Yaourt do something like that:
for pkg in `ls "/var/lib/pacman/local/"`; do
if echo $(cat "$PACMANROOT/local/$pkg/desc" 2>/dev/null) | grep -q "%REASON% 1"; then
pkgreason=1
else
pkgreason=0
fi
if [ $pkgreason -eq $reason ]; then echo "$pkg"; fi
done
It just work without any optimisation in mind, because that take only 5 sec with pacman-cage or pacman-drive
Oh and -Qe for explicitly installed package is more natural. Like in pacman 2.9
Offline