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