gc: make --prune useful again by accepting an optional parameter