ipcrm
[options]Remove a message queue, semaphore set, or shared memory identifier as specified by the options. ipcrm is useful for freeing shared memory left behind by programs that failed to deallocate the space. Use ipcs first to list items to remove.
-m
shmidRemove shared memory identifier shmid.
-M
shmkeyRemove shmid created with key shmkey.
-q
msqidRemove message queue identifier msqid.
-Q
msgkeyRemove msqid created with key msgkey.
-s
semidRemove semaphore identifier semid.
-S
semkeyRemove semid created with key semkey.