Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#16279 - pacman -Sc extension with arguments

Attached to Project: Pacman
Opened by Laszlo Papp (djszapi) - Sunday, 20 September 2009, 08:35 GMT
Last edited by Allan McRae (Allan) - Saturday, 03 October 2009, 10:08 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Hello!

It would be nice if pacman could handle package cleaning with arguments in regex way.

Example usage:
pacman -Sc alsa* -> remove the files from package cache dir which start with 'alsa'
pacman -Sc mpd-0.15.2 mc-4.6.1 -> remove mpd-0.15.2-1-$arch.pkg.tar.gz and mc-4.6.1-5-$arch.pkg.tar.gz. (you could combine with =, =>, =< too e.g.)

Thanks in advance.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 03 October 2009, 10:08 GMT
Reason for closing:  Won't fix
Additional comments about closing:  See comments
Comment by Allan McRae (Allan) - Sunday, 20 September 2009, 09:03 GMT
Wouldn't it be much better the other way - i.e. selecting packages too keep?

Anyway, I know what Dan is going to say to this. Same as he always says to advanced cache cleaning... "pacman is not a cache cleaning tool".
Comment by Dan McGee (toofishes) - Sunday, 20 September 2009, 15:41 GMT
Allan knows me too well. :)

Considering what you said is simply an alias for "rm /var/cache/pacman/pkg/<globexpression>", I see very little added value here.
Comment by Laszlo Papp (djszapi) - Sunday, 20 September 2009, 16:27 GMT
pacman -Scc is a simple rm procedure too e.g., in last case you could alias it without being a pacman option, maybe I'm wrong.
Comment by Dan McGee (toofishes) - Sunday, 20 September 2009, 17:39 GMT
I oversimplified slightly in that if you have multiple cache directories, -Sc and -Scc will operate across all of them.
Comment by Laszlo Papp (djszapi) - Sunday, 20 September 2009, 17:44 GMT
Yeah, but you could alias it in that case too, without being a separate pacman option. In this regard it doesn't count how many cache directory exists.
Comment by Allan McRae (Allan) - Monday, 21 September 2009, 05:27 GMT
Many people have suggested changes to the cache cleaning but they all tend to be rejected. Perhaps a general repo cleaning utility could be included in contrib if someone ever wrote one...
Comment by Dan McGee (toofishes) - Monday, 21 September 2009, 11:30 GMT
+1 to Allan's suggestion.

As a side note, I realized there was still one TODO in our current cache cleaning code, so I will have a patch for that shortly...

Loading...