Linux "ipcrm" Command Line Options and Examples
remove certain IPC resources

ipcrm removes 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. System V IPC objects are of three types: shared memory, message queues, and semaphores.


ipcrm [options]

    ipcrm {shm|msg|sem} id...

Command Line Options:

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 programscreate these resources at startup and may not have any code to deal with an unexpected disappearance.
ipcrm -a ...
Remove the shared memory segment created with shmkey after the last detach is performed.
ipcrm -M ...
Remove the shared memory segment identified by shmid after the last detach is performed.
ipcrm -m ...
Remove the message queue created with msgkey.
ipcrm -Q ...
Remove the message queue identified by msgid.
ipcrm -q ...
Remove the semaphore created with semkey.
ipcrm -S ...
Remove the semaphore identified by semid.
ipcrm -s ...
Display version information and exit.
ipcrm -V ...
Display help text and exit.NOTESIn its first Linux implementation, ipcrm used the deprecated syntax shown in the second line of the SYNOPSIS. Functionality presentin other *nix implementations of ipcrm has since been added, namely the ability to delete resources by key (not just identifier), andto respect the same command-line syntax. For backward compatibility the previous syntax is still supported.
ipcrm -h ...