You are not logged in.
Hello !
I wrote a little script to show new orphans after pacman -R:
http://archiwain.free.fr/os/i686/pacremove/pacremove
exemple:
# pacremove -Rcs grisbi
removing grisbi... done.
This packages are no longer used and can be removed:
libofx
Then I can manually remove "libofx" if I want
This is usefull for manually installed depends for aur's packages (with aurbuild or qpkg).
Maybe this little function could be added in pacman ?
Offline
Nice. This is something I was just thinking about yesterday.
Offline
wain:
E-Mail the script to Judd!
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
You know, to remove orphans with an uninstalled package you can use the '-s' option.
Offline
You know, to remove orphans with an uninstalled package you can use the '-s' option.
pacman -Rcs doesn't remove explicitly installed packages
Offline
Yup, right you are... Sorry, I didn't take that into account.
Offline
Is your host down? I came back to my arch machine just to get a timed out connection.
Offline
it seems to work.
#!/bin/bash
# wain@gmx.net
# pacremove is a pacman's wrapper that can look for orphans after removing packages
BEFORE=/tmp/before.$$
AFTER=/tmp/after.$$
VERSION='0.1.0'
if (( $# < 2 ))
then
cat << EOF
pacremove version $VERSION
usage: pacremove {-R --remove} [options] <package>
options:
-c, --cascade remove packages and all packages that depend on them
-d, --nodeps skip dependency checks
-k, --dbonly only remove database entry, do not remove files
-n, --nosave remove configuration files as well
-s, --recursive remove dependencies also (that won't break packages)
--config <path> set an alternate configuration file
--noconfirm do not ask for any confirmation
--noprogressbar do not show a progress bar when downloading files
-v, --verbose be verbose
-r, --root <path> set an alternate installation root
-b, --dbpath <path> set an alternate database locationthen
EOF
exit 0
fi
# search orphans before removing
pacman -Qe | awk '{print $1}' > $BEFORE
# remove with pacman
pacman $@
# search orphans after removing
pacman -Qe | awk '{print $1}' > $AFTER
# show new orphans
neworphans=$(comm -1 -3 $BEFORE $AFTER)
[ ! -z $neworphans ] && { echo "This packages are no longer used and can be removed:"; echo $neworphans; }
# remove tmp files
rm $BEFORE $AFTER
exit 0
Offline
thanks for the script
Offline
nice feature! I want to see in pacman!
Offline
Please send this script to the pacman-dev mailing list (for credit and discussion).
Offline
nice feature! I want to see in pacman!
Thanks,
This function is included in yaourt
The goal of yaourt is to
The goal of yaourt is to add all the things which I miss in pacman like AUR support, manage .pacsave/.pacnew files, clean database etc...
Free with the developers to re-use some yaourt's code in pacman (it's GPL)
Offline
Please send this script to the pacman-dev mailing list (for credit and discussion).
It seems I missed it. Was it included in pacman3?
to live is to die
Offline