Script to set/unset "automatic" status in PKGNG database

Matthew Seaman matthew at FreeBSD.org
Fri Aug 31 05:56:56 UTC 2012


On 30/08/2012 22:44, John Nielsen wrote:
> After dialog(1) exits the script has a list of packages to mark as
> automatic. Is there a non-SQL way to efficiently get the inverse?
> I.e. the set { all_packages - new_automatic_package_list } ?

Use pkg query - it is really quite powerful.  This shows all
non-autoremove packages as name-version:

pkg query -e '%a == 0' '%n-%v'

and this shows the port origin for all autoremove packages:

pkg query -e '%a == 1' '%o'

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 264 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120831/1bd0b32e/signature.pgp


More information about the freebsd-ports mailing list