You are not logged in.
I attempted to install the caffeine package from the AUR using packer. After confirming y to proceed with installation pacman had to pull in quite a few more dependencies than I was expecting. The installation ended up failing because I have package signing set to required. This is all well and good because I don't really think caffeine is worth all the extra dependencies. However, on to my question, I see that these packages (the dependencies) have been downloaded to my system and are in the /var/cache/pacman/pkg directory, is there an easy way to tell pacman to remove just these packages other than going through and removing them one by one? Thanks for the help.
Last edited by Lexworth (2012-01-21 19:19:43)
Offline
You have the list of installed packages in your pacman log file, you have bash. I don't think there is anything else you might need.
Offline
Try: sudo pacman -R $(pacman -Qdtq)
Look closely at the list of things it proposes removing.
I leave it as an exercise to the reader to decipher that command by reading man pacman
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
@ewaller
Wouldn't e.g. 'pacman -Rns' make more sense than 'pacman -R'?
After you uninstall the packages, run 'pacman -Sc' to get rid of them (and some other unused ones) from the cachedir.
Offline
@karol
I think the recursive option -s is useless as packages are already selected by -Qdt.
Last edited by Paulloz (2012-01-21 19:14:15)
Why choose the lesser evil ?
You can follow me on Twitter (beware, it's mostly french).
Offline
Thanks to you all. I did read pacman manpage as well as the wiki entries for pacman and pacman Tips. I was just wondering if maybe someone more proficient with the command line knew a easier way to remove the files. I know I could use pacman -Sc or pacman -Scc for clean the entire cache but was hesitant to do so because of the warnings. I think I understand that sudo pacman -R $(pacman -Qtdq) will remove orphan packages however I get an error that no targets are specified. I believe this may be due to the fact that these packages were not installed, just the binaries downloaded. Thanks again for the help. I'll mark this as solved.
Offline
@karol
I think the recursive option -s is useless as packages are already selected by -Qdt.
They may depend on some other packages.
Let's say 'pacman -Qdt' returns package A.
Package A needs packages B and C. Neither B nor C is needed by any other package. If you remove just A, B and C will remain and you will have to run 'pacman -Qdt' again to spot this.
Last edited by karol (2012-01-21 19:19:28)
Offline
@ewaller
Wouldn't e.g. 'pacman -Rns' make more sense than 'pacman -R'?
Not quite. That command requires a target, then the target, plus all its dependencies are removed (provided those dependencies are not used elsewhere)
My command does not require a target, it just looks for all the orphans on the system.
The OP stated that he never managed to get the target installed.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
No, I meant
sudo pacman -Rns $(pacman -Qdtq)instead of
sudo pacman -R $(pacman -Qdtq)Offline
No, I meant
sudo pacman -Rns $(pacman -Qdtq)instead of
sudo pacman -R $(pacman -Qdtq)
Oh. Got it ![]()
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Paulloz wrote:@karol
I think the recursive option -s is useless as packages are already selected by -Qdt.They may depend on some other packages.
Let's say 'pacman -Qdt' returns package A.
Package A needs packages B and C. Neither B nor C is needed by any other package. If you remove just A, B and C will remain and you will have to run 'pacman -Qdt' again to spot this.
Yes, I haven't thought about it.
Why choose the lesser evil ?
You can follow me on Twitter (beware, it's mostly french).
Offline