dbus-cleanup-sockets(1)

dbus-cleanup-sockets1

Clean up leftover sockets in a directory

Usage

dbus-cleanup-sockets [DIRECTORY]

Overview

The dbus-cleanup-sockets command cleans up unused D-Bus connection sockets. See https://www.freedesktop.org/wiki/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"

Releases

12 releases since Debian 3.1 (Sarge); the text changed 9 times.

  1. 3.1
  2. 4.0–6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Author

dbus-cleanup-sockets was adapted by Havoc Pennington from linc-cleanup-sockets written by Michael Meeks.

Bugs

Please send bug reports to the D-Bus mailing list or bug tracker, see https://www.freedesktop.org/wiki/Software/dbus/

From dbus 1.16.2-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.