IPCRM(1)
โจ IPCRM ๐
โ the ipcrm(1) glow-up โจ
okay bestie, so this is ipcrm, from section 1 of the manual (User Commands, iykyk) ๐ โ the little utility that yeets inter-process communication stuff off your system. Let's get into it fr fr.
๐ธ NAME ๐ธ
ipcrm โ remove certain IPC resources ๐
๐ฆ SYNOPSIS ๐ฆ
ipcrm [options]
ipcrm [shm|msg|sem] ID ...
two whole ways to talk to it, pick your fighter ๐ซถ
๐ DESCRIPTION ๐
ipcrm removes POSIX and System V inter-process communication (IPC) objects and associated data structures from the system. In order to delete such objects, you must be superuser, or the creator or owner of the object.
like, no cap, you need the power. root, or the creator/owner of the thing. that's the vibe check ๐ฅ
POSIX and System V IPC objects are of three types: shared memory, message queues, and semaphores. Deletion of a message queue or semaphore object is immediate (regardless of whether any process still holds an IPC identifier for the object). A shared memory object is only removed after all currently attached processes have detached (shmdt(2)) the object from their virtual address space.
okay so msg queues and semaphores? gone instantly, no waiting, periodt ๐. shared memory is the dramatic one โ it's not leaving until every attached process detaches with shmdt(2). main character energy tbh.
Two syntax styles are supported. The old Linux historical syntax specifies a three-letter keyword indicating which class of object is to be deleted, followed by one or more IPC identifiers for objects of this type.
The SUS-compliant syntax allows the specification of zero or more objects of all three types in a single command line, with objects specified either by key or by identifier (see below). Both keys and identifiers may be specified in decimal, hexadecimal (specified with an initial '0x' or '0X'), or octal (specified with an initial '0').
sooo there's the old-school way (three-letter keyword + one or more IDs) and the SUS-compliant way, which is lowkey flexible: zero or more objects, all three types, in one command line, by key or by identifier. and numbers can be decimal, hexadecimal (initial '0x' or '0X') or octal (initial '0') ๐งโจ
The details of the removes are described in shmctl(2), shm_unlink(3), msgctl(2), mq_unlink(3), semctl(2), and sem_unlink(3). The identifiers and keys can be found by using lsipc(1) or ipcs(1).
need to find your IDs and keys first? go snoop with lsipc(1) or ipcs(1) ๐
๐ OPTIONS ๐
-a,--all [shm] [pshm] [msg] [pmsg] [sem] [psem]โ Remove all resources. When an option argument is provided, the removal is performed only for the specified resource types.
โ ๏ธ Warning! Do not use -a if you are unsure how the software using the resources might react to missing objects. Some programs create these resources at startup and may not have any code to deal with an unexpected disappearance. bestie this is the "nuke it from orbit" option, pls be careful ๐ญ
-M,--shmem-key shmkeyโ Remove the shared memory segment created with shmkey after the last detach is performed.-m,--shmem-id shmidโ Remove the shared memory segment identified by shmid after the last detach is performed.--posix-shmem nameโ Remove the POSIX shared memory segment created with name.-Q,--queue-key msgkeyโ Remove the message queue created with msgkey.-q,--queue-id msgidโ Remove the message queue identified by msgid.--posix-mqueue nameโ Remove the POSIX message queue created with name.-S,--semaphore-key semkeyโ Remove the semaphore created with semkey.-s,--semaphore-id semidโ Remove the semaphore identified by semid.--posix-semaphore nameโ Remove the POSIX named semaphore created with name.-v,--verboseโ Enable verbose messaging. it'll tell you what it's doing, obsessed ๐-h,--helpโ Display help text and exit.-V,--versionโ Display version and exit.
๐ NOTES ๐
In its first Linux implementation, ipcrm used the deprecated syntax shown in the second line of the SYNOPSIS. Functionality present in other *nix implementations of ipcrm has since been added, namely the ability to delete resources by key (not just identifier), and to respect the same command-line syntax. For backward compatibility the previous syntax is still supported.
so the og Linux ipcrm only did the deprecated syntax from line two of the SYNOPSIS, and then it got the glow-up: delete by key (not just identifier) and match the same command-line syntax as other *nix versions. the old syntax is still supported for backward compatibility, no one's getting left behind ๐ซถ
๐ฅ SEE ALSO ๐ฅ
ipcmk(1), ipcs(1), lsipc(1), msgctl(2), mq_unlink(3), msgget(2), semctl(2), semget(2), sem_unlink(3), shmctl(2), shmdt(2), shmget(2), shm_unlink(3), ftok(3), sysvipc(7)
๐ญ REPORTING BUGS ๐ญ
For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.
found a bug? tell the maintainers, they wanna know fr fr ๐
๐ AVAILABILITY ๐
The ipcrm command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
and that's the whole page, bestie โจ this one's util-linux 2.42.4, dated 2026-09-21 โ go forth and remove your IPC resources responsibly, mwah ๐๐
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms