You are not logged in.
Pages: 1
Well I'm not sure if this topic as already be solved but here is a little bash function I wrote to do it :
myremove() {
# save package list
lspac > tmp1
# remove packages
rmpac $*
# new list for comparison
lspac > tmp2
# packages to remove during next step
NEWLISTE=`diff tmp1 tmp2 | grep > | cut -d " " -f2 | tr "n" " "`
if [ -n "$NEWLISTE" ]; then
# remove dependencies
myremove $NEWLISTE
else
# remove tmp files
rm tmp1 tmp2
fi
}
with :
alias lspac="pacman -Qi --orphan | cut -d ' ' -f1"
alias rmpac="pacman -Rn"
Well it works and that's all, no confirmation etc but I think it should be easy to implement. The basic idea behind this is that if you remove a package and that package has a dependency, let say X, you have two choice :
- either something else uses X and you won't remove it because it won't appear in the list of "orphan packages"
- either nothing uses it and it appears in the orphan list, so it will be removed during next call
Hope it will be helpfull.
Offline
i thought that is what the cascading removal option was?
AKA uknowme
I am not your friend
Offline
Well in fact I think that the cascade package remove packages depending on the one you're removing to avoid breaking dependencies, whereas what I do is removing the unused dependencies.
if you've got : X -> Y -> Z
and you remove Y
- pacman -Rc removes X and Y
- I remove Y and Z if Z is unused
(hoping I'm right ant the cascade option does this)
Offline
Well this is now obsolete since the "--recursive" option has been added (see pacman changelog)
Good news
Offline
Pages: 1