Команда ipcrm
Remove a message queue, semaphore set or shared memory id.
ipcrm removes System V interprocess 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. 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 pro- cesses have detached (shmdt)) the object from their virtual address space.
Two syntax styles are supported. The old Linux historical syntax specifies a three letter keyword indi- cating which class of object is to be deleted, followed by one or more IPC identifiers for objects of this type.