dbus-cleanup-sockets β clean up leftover sockets in a directory
| Use Case | Command | Description |
|---|---|---|
| π§Ή Clean default socket directory | dbus-cleanup-sockets | Cleans up unused DβBus sockets in the standard default directory (usually /tmp) |
| π Clean a specific directory | dbus-cleanup-sockets DIRECTORY | Cleans up sockets in the given directory |
| β²οΈ Run in a cron job | dbus-cleanup-sockets | Periodically mop up leaked sockets (useful on nonβLinux systems) |
dbus-cleanup-sockets [DIRECTORY]
The dbus-cleanup-sockets command cleans up unused DβBus connection sockets. See http://www.freedesktop.org/software/dbus/ for more information about the big picture.
If given no arguments, dbus-cleanup-sockets cleans up sockets in the standard default socket
directory for the perβuserβloginβsession message bus; this is usually /tmp. Optionally, you
can pass a different directory on the command line.
On Linux, this program is essentially useless, because DβBus defaults to using "abstract
sockets" that exist only in memory and don't have a corresponding file in /tmp.
On most other flavors of UNIX, it's possible for the socket files to leak when programs using
DβBus exit abnormally or without closing their DβBus connections. Thus, it might be
interesting to run dbus-cleanup-sockets in a cron job to mop up any leaked sockets. Or you
can just ignore the leaked sockets, they aren't really hurting anything, other than
cluttering the output of ls /tmp
dbus-cleanup-sockets was adapted by Havoc Pennington from linc-cleanup-sockets written by Michael Meeks.
Please send bug reports to the DβBus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/
DβBus 1.12.20βββββββββββββββββββββββββββββββββββDBUS-CLEANUP-SOCKE(1)
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-03 09:27 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)