Add support for `-r ${REPOSITORY}` and `-X ${REPOSITORY}` flags for `pkg delete` command
That would greatly resolve the 'problem' of pkg delete -yaf command on PKGBASE system.
With these:
# pkg delete -yaf -r FreeBSD-ports -r FreeBSD-ports-kmods
The entire FreeBSD Base System remains untouched - just like in freebsd-update(8) times.
... also - it would be great to also have 'negative' version - like pkg delete with FreeBSD-base repo EXCLUDED.
# pkg delete -yaf -X FreeBSD-base
Regards, vermaden
Concerning the -r I already replied here: https://github.com/freebsd/pkg/issues/2494 as I am not against, but it does not make sense as the repository is a volatile notion "not a package metadata". i like the -X idea.
OK - lets try from another side ... pkg delete command already supports --glob option ...
% man pkg-delete | grep -A 1 -- --glob
-g, --glob
Treat the package names as shell glob patterns.
I have tried to provide argument for --glob that would exclude all FreeBSD Base System packages ... but failed to find one.
Do you know what should I add to --glob option to exclude all PKGBASE packages - so only the third party packages would be removed?
Thanks, vermaden
I understand your point and agree we should implement something like the -X you propose or --glob-exclude (-G ?)
That would be great.
It was not that needed in the freebsd-update(8) times but it is more then needed in the PKGBASE world :)