AA-REMOVE-UNKNOWN(8)

โœจ AA-REMOVE-UNKNOWN โœจ

okay bestie, this is the aa-remove-unknown page from the AppArmor corner of the manual, section 8 (that's the sysadmin-y one, iykyk) ๐Ÿ’…


๐ŸŒธ NAME ๐ŸŒธ

aa-remove-unknown โ€” bestie's little cleanup crew that removes unknown AppArmor profiles ๐Ÿงนโœจ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

aa-remove-unknown [option]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so here's the vibe: aa-remove-unknown takes inventory of literally every profile chillin' in /etc/apparmor.d/, then compares that list against the profiles that are currently loaded into the kernel ๐Ÿ‘€

then it removes all of the loaded profiles that were not found in /etc/apparmor.d/. not a single crumb left behind, periodt.

and the way it's so transparent about it?? it also reports the name of each profile that it removes on standard out. so you always know exactly what got yeeted. iconic behavior honestly ๐Ÿซถ


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -h, --help โ€” displays a short usage statement. tiny little "here's how you use me" moment ๐Ÿฅฐ
  • -n โ€” dry run; only prints the names of profiles that would be removed. no actual deleting, just a little peek at the chaos, main character energy ๐Ÿ‘‘

โญ EXAMPLES โญ

the classic "look before you leap" combo:

$ sudo ./aa-remove-unknown -n
Would remove 'test//null-/usr/bin/whoami'
Would remove 'test'

and then the real thing once you're feeling brave:

$ sudo ./aa-remove-unknown
Removing 'test//null-/usr/bin/whoami'
Removing 'test'

see how the second one says Removing instead of Would remove?? yeah. that's the dry-run-to-real-run pipeline working exactly as intended ๐Ÿ’…


๐Ÿ’€ BUGS ๐Ÿ’€

None. ๐Ÿ˜Œ zero. not a one. flawless, obviously. but if you find some, please report any you find to Gitlab at <https://gitlab.com/apparmor/apparmor/-/issues>. don't be shy about it bestie, they wanna know ๐Ÿ™ˆ


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

apparmor(7) โ€” go read that one too, it's the lore ๐Ÿ“


โš ๏ธ real talk for a sec: -n is your bestie here. it literally just prints the names of profiles that would be removed, nothing more. use it first. always. then run the real thing. that's the move ๐ŸŒˆ

mwah ๐Ÿ’œ this little slice of AppArmor joy comes to you from version AppArmor 6.0.0~alpha1, dated 2026-10-05. thanks for reading, ily, go clean up your kernel ๐Ÿ”ฅโœจ

๐Ÿ“ฆ where this page comes from