tracefs_remove(9)
π tracefs_remove(9) β the Kernel API Manual glow-up π
okay so bestie, we're in the Kernel API Manual today and the star of the show is tracefs_remove(9). yes it's a kernel function. yes it's a void. no we're not scared. let's get into it β¨
πΈ NAME πΈ
tracefs_remove β this one recursively removes a directory. like, the whole tree. gone. no crumbs. π
β¨ SYNOPSIS β¨
void tracefs_remove (struct dentry *dentry );
that's it. that's the whole signature. one argument, zero return value, maximum main character energy π
π«Ά ARGUMENTS π«Ά
dentryβ a pointer to thedentryof the directory that's getting removed. that's the vibe check you gotta pass in π
π¦ DESCRIPTION π¦
so here's the tea, bestie: this function recursively removes a directory tree in tracefs β and when I say recursively I mean it takes the entire tree down with it, not just the top-level folder π«£
and the little lore drop is that this tree was previously created with a call to another tracefs function β like tracefs_create_file or any of its variants. so basically: you made it with tracefs, you clean it up with tracefs. balanced. as all things should be π
no cap, "recursively" is doing a lot of work in that sentence. everything under that dentry is going bye-bye. π§
π SEE ALSO π
- Kernel file
./fs/tracefs/inode.c tracefs_create_file(9)tracefs_create_dir(9)tracefs_create_instance_dir(9)tracefs_initialized(9)
go read the source bestie, it's giving essential reading ππ
and that's the page!! sourced from ./fs/tracefs, dated October 2026 β mwah, stan the kernel docs, bye bestie πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms