#compdef pkgrm

_pkgrm() {
	_arguments -s \
	'-Y[Select packages by category]:category: ' \
	- set1 \
	'-n[Non-interactive mode]' \
	'-v[Trace all scripts]' \
	'-a[Admin file]:admin file:_files' \
	"-A[Force removal of all files]" \
	"-M[Don't use vfstab file]" \
	'-R[Root path]:root path:_files -/' \
	'-V[Alternate vfstab file]:vfstab file:_files' \
	'*:package instance:_pkg_instance --_opts installed:set1--R' \
	- set2 \
	'-s[Spool package]:spool directory:_files -/' \
	'*:package instance:_pkg_instance --_opts spooled:set2--s'
}

_pkgrm "$@"
