IPCRM(1POSIX)
π IPCRM β the POSIX Programmer's Manual era π
okay bestie, so this page lives in the POSIX Programmer's Manual (that's the manual name, it's giving official), and heads up before we even start: the Linux implementation of this interface may differ β so if you're on Linux, go check the corresponding Linux manual page for the real tea. or honestly? the interface might not even be implemented on Linux at all. π
β¨ PROLOG β¨
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
no cap, read that twice. it's the fine print that saves you. π«Ά
πΈ NAME πΈ
ipcrm β remove an XSI message queue, semaphore set, or shared memory segment identifier
like. it deletes your interprocess communication stuff. that's the whole job. iconic honestly.
β SYNOPSIS β
ipcrm [-q msgid|-Q msgkey|-s semid|-S semkey|-m shmid|-M shmkey]...
see those ... at the end? yeah, you can stack these. multiple things, one command, one slay. π₯
π DESCRIPTION π
The ipcrm utility shall remove zero or more message queues, semaphore sets, or shared memory segments. Which interprocess communication facilities get removed? that's decided entirely by the options you pass, bestie. you point, it deletes.
Only a user with appropriate privileges shall be allowed to remove an interprocess communication facility that was not created by or owned by the user invoking ipcrm.
translation: if it's not yours and you're not privileged, hands off. π« no touching other people's stuff.
π OPTIONS π
The ipcrm utility shall conform to the Base Definitions volume of POSIX.1β2017, Section 12.2, Utility Syntax Guidelines. (yes, there's a whole guideline situation and it's following it. well behaved king. π)
The following options shall be supported:
-q msgidβ remove the message queue identifiermsgidfrom the system, and destroy the message queue and the data structure associated with it. gone. bye. π-m shmidβ remove the shared memory identifiershmidfrom the system. the shared memory segment and the data structure associated with it shall be destroyed after the last detach. so like, it's not instant-instant, it waits its turn.-s semidβ remove the semaphore identifiersemidfrom the system and destroy the set of semaphores and the data structure associated with it. β¨-Q msgkeyβ remove the message queue identifier created with keymsgkeyfrom the system, and destroy the message queue and the data structure associated with it. (yes, by key this time, not by id β very iykyk)-M shmkeyβ remove the shared memory identifier created with keyshmkeyfrom the system. the shared memory segment and the data structure associated with it shall be destroyed after the last detach. same detach drama as-m.-S semkeyβ remove the semaphore identifier created with keysemkeyfrom the system and destroy the set of semaphores and the data structure associated with it. π
so real talk: lowercase = you're giving it an id. uppercase = you're giving it a key. that's the pattern, that's the vibe check, you're welcome. π
π¦ OPERANDS π¦
None.
literally none. this one does not take operands. everything comes in through the options. periodt.
π STDIN π
Not used.
it is not reading from you. it is not listening. π
πΈ INPUT FILES πΈ
None.
π§ ENVIRONMENT VARIABLES π§
The following environment variables shall affect the execution of ipcrm:
LANGβ provide a default value for the internationalization variables that are unset or null. (see the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ if set to a non-empty string value, override the values of all the other internationalization variables. it's the main character, it overrides everybody. πLC_CTYPEβ determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).LC_MESSAGESβ determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.NLSPATHβ determine the location of message catalogs for the processing ofLC_MESSAGES.
β ASYNCHRONOUS EVENTS β
Default.
no special signal choreography here, just the default behavior. chill. π«Ά
β¨ STDOUT β¨
Not used.
not a single character goes out. it's silent, it's mysterious, it's doing its thing in the dark. π
π STDERR π
The standard error shall be used only for diagnostic messages.
that's it. that's the only place it speaks. and only when something's up. π
π OUTPUT FILES π
None.
π EXTENDED DESCRIPTION π
None.
no extra lore. the description was the description. we move. π₯
π EXIT STATUS π
The following exit values shall be returned:
0β Successful completion. ate. π>0β An error occurred. π
π CONSEQUENCES OF ERRORS π
Default.
The following sections are informative.
ok so heads up: everything from here down is informative, meaning it's context and lore, not requirements. just so you know what you're reading, bestie.
π¦ APPLICATION USAGE π¦
None.
π EXAMPLES π
None.
no examples on this one. shocking, I know. π
π RATIONALE π
None.
β FUTURE DIRECTIONS β
None.
πΈ SEE ALSO πΈ
ipcs- The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
- The System Interfaces volume of POSIX.1β2017,
msgctl(),semctl(),shmctl()
like yeah, go read ipcs to see what's there, then come back here to remove it. and those three system interfaces? that's where the actual machinery lives. iykyk. β¨
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
ok that's the whole thing, bestie π this page came to you from the IEEE/The Open Group, dated 2017, and its manual name is IPCRM(1POSIX) β go forth and clean up your IPC like the icon you are. πβ¨π¦
π¦ where this page comes from
- debian bookworm: manpages-posix 2017a-2 Β· Other
- debian trixie: manpages-posix 2017a-2 Β· Other
- ubuntu jammy: manpages-posix 2017a-2 Β· Other
- ubuntu noble: manpages-posix 2017a-2 Β· Other
- ubuntu resolute: manpages-posix 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms