1IPCRM(1) User Commands IPCRM(1)
2
3
4
6 ipcrm - remove certain IPC resources
7
9 ipcrm [options]
10
11 ipcrm {shm|msg|sem} id...
12
14 ipcrm removes System V inter-process communication (IPC) objects and
15 associated data structures from the system. In order to delete such
16 objects, you must be superuser, or the creator or owner of the object.
17
18 System V IPC objects are of three types: shared memory, message queues,
19 and semaphores. Deletion of a message queue or semaphore object is
20 immediate (regardless of whether any process still holds an IPC identi‐
21 fier for the object). A shared memory object is only removed after all
22 currently attached processes have detached (shmdt(2)) the object from
23 their virtual address space.
24
25 Two syntax styles are supported. The old Linux historical syntax spec‐
26 ifies a three-letter keyword indicating which class of object is to be
27 deleted, followed by one or more IPC identifiers for objects of this
28 type.
29
30 The SUS-compliant syntax allows the specification of zero or more
31 objects of all three types in a single command line, with objects spec‐
32 ified either by key or by identifier (see below). Both keys and iden‐
33 tifiers may be specified in decimal, hexadecimal (specified with an
34 initial '0x' or '0X'), or octal (specified with an initial '0').
35
36 The details of the removes are described in shmctl(2), msgctl(2), and
37 semctl(2). The identifiers and keys can be found by using ipcs(1).
38
40 -a, --all [shm] [msg] [sem]
41 Remove all resources. When an option argument is provided, the
42 removal is performed only for the specified resource types.
43 Warning! Do not use -a if you are unsure how the software using
44 the resources might react to missing objects. Some programs
45 create these resources at startup and may not have any code to
46 deal with an unexpected disappearance.
47
48 -M, --shmem-key shmkey
49 Remove the shared memory segment created with shmkey after the
50 last detach is performed.
51
52 -m, --shmem-id shmid
53 Remove the shared memory segment identified by shmid after the
54 last detach is performed.
55
56 -Q, --queue-key msgkey
57 Remove the message queue created with msgkey.
58
59 -q, --queue-id msgid
60 Remove the message queue identified by msgid.
61
62 -S, --semaphore-key semkey
63 Remove the semaphore created with semkey.
64
65 -s, --semaphore-id semid
66 Remove the semaphore identified by semid.
67
68 -V, --version
69 Display version information and exit.
70
71 -h, --help
72 Display help text and exit.
73
75 In its first Linux implementation, ipcrm used the deprecated syntax
76 shown in the second line of the SYNOPSIS. Functionality present in
77 other *nix implementations of ipcrm has since been added, namely the
78 ability to delete resources by key (not just identifier), and to
79 respect the same command-line syntax. For backward compatibility the
80 previous syntax is still supported.
81
83 ipcmk(1), ipcs(1), msgctl(2), msgget(2), semctl(2), semget(2),
84 shmctl(2), shmdt(2), shmget(2), ftok(3)
85
87 The ipcrm command is part of the util-linux package and is available
88 from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
89 linux/⟩.
90
91
92
93util-linux July 2014 IPCRM(1)