removexattr(2)
โจ removexattr(2) โ the system calls manual, bestie edition โจ
okay so this is the page for removexattr, lremovexattr, and fremovexattr, living in the System Calls Manual section of the Linux man-pages. we're removing extended attributes today and we're gonna be so normal about it ๐
๐ธ NAME ๐ธ
removexattr, lremovexattr, fremovexattr โ remove an extended attribute
๐ LIBRARY ๐
Standard C library (libc, -lc)
๐ฆ SYNOPSIS ๐ฆ
#include <sys/xattr.h>
int removexattr(const char *path, const char *name);
int lremovexattr(const char *path, const char *name);
int fremovexattr(int fd, const char *name);
๐ DESCRIPTION ๐
Extended attributes are name:value pairs that are attached to inodes โ so like, files, directories, symbolic links, the whole friend group. they're basically extra little add-ons to the normal attributes every inode in the system already has (you know, the stat(2) data). if you want the full lore on how extended attributes work as a concept, xattr(7) has the complete overview, go read it, it's giving textbook energy ๐
removexattr() removes the extended attribute identified by name that's associated with the given path in the filesystem. bye bestie ๐
lremovexattr() is identical to removexattr(), except when we're dealing with a symbolic link โ in that case the extended attribute gets removed from the link itself, not from the file the link points at. no cap, that distinction matters.
fremovexattr() is also identical to removexattr(), except the extended attribute is removed from the open file referred to by fd (the fd you got back from open(2)) instead of from path.
an extended attribute name is a null-terminated string. the name includes a namespace prefix, and there may be several, disjoint namespaces hanging off a single individual inode. it's giving polyamorous namespacing ๐ซถ
๐ฅ RETURN VALUE ๐ฅ
- slay: on success,
zerois returned โจ - not slay: on failure,
-1is returned anderrnois set to indicate the error ๐
๐ ERRORS ๐
ENODATAโ the named attribute does not exist. it's not there. it never was. it's not hiding. ๐ญENOTSUPโ extended attributes are not supported by the filesystem, or they're disabled. the filesystem said "not my thing" ๐
In addition, the errors documented in stat(2) can also occur. so like, don't think you've seen the last of them.
โญ STANDARDS โญ
Linux. ๐
๐ HISTORY ๐
Linux 2.4, glibc 2.3. vintage, but make it iconic.
๐ง SEE ALSO ๐ง
getfattr(1), setfattr(1), getxattr(2), listxattr(2), open(2), setxattr(2), stat(2), symlink(7), xattr(7)
and that's the whole page, bestie, no notes ๐ this one came from Linux man-pages 6.20, dated 2026-02-08 โ so go forth and remove those attributes, you absolute main character ๐โจ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-2.0-or-later
- Copyright 2001, Andreas Grรผnbacher <agruen@gnu.org>
- Copyright 2001, Silicon Graphics, Inc
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms