aa_remove_profiles(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aa_remove_profiles β€” bestie edition

okay so you're looking at aa_remove_profiles(9), and yes that's the kernel API manual, we're doing kernel internals today, stay with me 🫢


✨ NAME ✨

aa_remove_profiles β€” removes profile(s) from the system, no cap, they're gone


πŸ¦‹ SYNOPSIS πŸ¦‹

ssize_t aa_remove_profiles (struct aa_ns *policy_ns , struct aa_label
*subj , char *fqname , size_t size );

that's the whole signature, character for character, don't come for me πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • policy_ns β€” the namespace the remove is being done from. like, where the whole operation is happening ✨
  • subj β€” the label that's attempting to remove policy. yes, this stuff is permission-gated, it's giving main character energy with a bouncer πŸ‘‘
  • fqname β€” the name of the profile or namespace to remove. and it is (NOT NULL) β€” not me being dramatic, that's literally in the manual, so do not pass NULL πŸ™ˆ
  • size β€” the size of the name. she needs to know how long it is, periodt

🌸 DESCRIPTION 🌸

so what actually happens? you remove a profile or a sub namespace from the current namespace β€” and once it's out, it can not be found anymore. literally unfindable. and it gets marked as replaced by unconfined.

that's the whole vibe check πŸ”₯


πŸ’€ NOTE πŸ’€

important caveat, bestie, do not skip this: removing confinement does not restore rlimits to preconfinement values. like, the rlimits stay where they are. no takebacks. that's just how it is 😭

⭐ RETURN ⭐

returns the size of data consume, or else an error code if it fails. that's it, that's the return, slay


🌈 SEE ALSO 🌈

kernel file ./security/apparmor/policy.c β€” and here's the whole friend group, all of them, in order, i'm not skipping a single one:

iykyk πŸ§šπŸ’œ


aaaand that's the page! this little gem lives in ./security/apparmor and the version/date stamped on it is October 2026 β€” so yeah, future-coded icon behavior β­πŸŽ€ go forth and remove profiles responsibly, mwah πŸ’–

πŸ“¦ where this page comes from