ipcrm(1)

ipcrm1

Remove the specified message queues, semaphore sets, and shared memory segments

Usage

ipcrm [-M shmkey] [-m shmid] [-Q msgkey] [-q msqid] [-S semkey] [-s semid] ...

Overview

ipcrm removes the specified message queues, semaphores, and shared memory segments. These System V IPC objects can be specified by their creation ID or any associated key.

The options are as follows:

-M shmkey

Mark the shared memory segment associated with key shmkey for removal. This marked segment will be destroyed after the last detach.

-m shmid

Mark the shared memory segment associated with ID shmid for removal. This marked segment will be destroyed after the last detach.

-Q msgkey

Remove the message queue associated with key msgkey from the system.

-q msqid

Remove the message queue associated with the ID msqid from the system.

-S semkey

Remove the semaphore set associated with key semkey from the system.

-s semid

Removes the semaphore set associated with ID semid from the system.

The identifiers and keys associated with these System V IPC objects can be determined by using ipcs(1).

Exit status

The ipcrm utility exits 0 on success, and >0 if an error occurs.

Releases

61 releases since OpenBSD 2.1; the text changed 13 times.

  1. 2.1–2.3
  2. 2.4–2.5
  3. 2.6
  4. 2.7–2.8
  5. 2.9–3.2
  6. 3.3
  7. 3.4
  8. 3.5–3.6
  9. 3.7–4.1
  10. 4.2–4.7
  11. 4.8
  12. 4.9–5.5
  13. 5.6–5.8
  14. 5.9–8.0

Standards

The ipcrm utility is compliant with the X/Open System Interfaces option of the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.