That's been a hot topic on the MLs. In my view some of the responses on the use ofone more question: before I didpkg delete -afto have a clean base system, how am I supposed to accomplish that now with pkgbase?
pkg delete -a[f] could have been more thoughtful towards users and their practices. I like this response (by jamie at the forums IIRC); my thoughts are along similar lines.It is not uncommon that unintended use is deployed by users in need of a particular solution. Now that particular use happens in a new environment.
pkg delete --allportspackages does not exist. Have a look at this sequence:
Code:
# pkg query -e '%o~base/* && %k != 1' '%n' > lock-unlock.list
# pkg lock -y $( cat ./lock-unlock.list )
# pkg delete -a
# pkg unlock -y $( cat lock-unlock.list )
# rm ./lock-unlock.list
pkg query -e '%o~base/* && %k != 1' '%n' should be much better served when base packages are saved in the pkg db stores as such. I imagine, it wouldn't be that hard given freebsd-base(7) states that base packages have as unique property:
Code:
All base packages have names beginning with the string
"FreeBSD-", and have an origin beginning with "base/".
pkg query -e '%Z=1' '%n'Conversely, list all non-base packages:
pkg query -e '%Z!=1' '%n'Having implemented this, implementing the much desired delete all installed packages from the ports tree with:
pkg delete -e '%Z!=1'