Extend the -Sc operation to also clean up unused sync databases.
We discussed this with stonecrest on IRC :
20:46 stonecrest >> someone brings up a good point.. why aren't repos that aren't in the pacman.conf removed from /var/lib/pacman?
20:46 stonecrest >> i have 118mb and 24 dirs in there, but only 5 repos at present
21:26 stonecrest >> shining: i guess you could prompt the user on deleting every dir in /var/lib/pacman.. since it shouldn't happen that often except for
the first time
21:30 stonecrest >> could be part of pacman -Sc.. what else were you thinking?
I already heard about this before, but it sounded dangerous to me. I didn't even think about a simple prompt.
I also didn't know where this code would fit. And it fits well with -Sc, I borrowed most of the code from sync_cleancache.
Example session :
Cache directory: /var/cache/pacman/pkg/
Do you want to remove non-installed packages from cache? [Y/n] n
Database directory: /var/lib/pacman/
Do you want to remove unused repositories? [Y/n]
Do you want to remove /var/lib/pacman/sync/pacman-git? [Y/n]
Do you want to remove /var/lib/pacman/sync/deltatest? [Y/n]
Database directory cleaned up
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
0 files changed, 0 insertions, 0 deletions