1IPCRM(1)                         User Commands                        IPCRM(1)
2
3
4

NAME

6       ipcrm - remove certain IPC resources
7

SYNOPSIS

9       ipcrm [options]
10
11       ipcrm [shm|msg|sem] ID ...
12

DESCRIPTION

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
21       identifier for the object). A shared memory object is only removed
22       after all currently attached processes have detached (shmdt(2)) the
23       object from their virtual address space.
24
25       Two syntax styles are supported. The old Linux historical syntax
26       specifies a three-letter keyword indicating which class of object is to
27       be 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
32       specified either by key or by identifier (see below). Both keys and
33       identifiers 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

OPTIONS

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
44           Warning! Do not use -a if you are unsure how the software using the
45           resources might react to missing objects. Some programs create
46           these resources at startup and may not have any code to deal with
47           an unexpected disappearance.
48
49       -M, --shmem-key shmkey
50           Remove the shared memory segment created with shmkey after the last
51           detach is performed.
52
53       -m, --shmem-id shmid
54           Remove the shared memory segment identified by shmid after the last
55           detach is performed.
56
57       -Q, --queue-key msgkey
58           Remove the message queue created with msgkey.
59
60       -q, --queue-id msgid
61           Remove the message queue identified by msgid.
62
63       -S, --semaphore-key semkey
64           Remove the semaphore created with semkey.
65
66       -s, --semaphore-id semid
67           Remove the semaphore identified by semid.
68
69       -h, --help
70           Display help text and exit.
71
72       -V, --version
73           Print version and exit.
74

NOTES

76       In its first Linux implementation, ipcrm used the deprecated syntax
77       shown in the second line of the SYNOPSIS. Functionality present in
78       other *nix implementations of ipcrm has since been added, namely the
79       ability to delete resources by key (not just identifier), and to
80       respect the same command-line syntax. For backward compatibility the
81       previous syntax is still supported.
82

SEE ALSO

84       ipcmk(1), ipcs(1), msgctl(2), msgget(2), semctl(2), semget(2),
85       shmctl(2), shmdt(2), shmget(2), ftok(3), sysvipc(7)
86

REPORTING BUGS

88       For bug reports, use the issue tracker at
89       https://github.com/util-linux/util-linux/issues.
90

AVAILABILITY

92       The ipcrm command is part of the util-linux package which can be
93       downloaded from Linux Kernel Archive
94       <https://www.kernel.org/pub/linux/utils/util-linux/>.
95
96
97
98util-linux 2.38.1                 2022-05-11                          IPCRM(1)
Impressum