#776902 tmux: leaves a socket behind in /tmp/tmux-1000/default on exit

Package:
tmux
Source:
tmux
Description:
terminal multiplexer
Submitter:
Paul Wise
Date:
2026-04-09 15:45:01 UTC
Severity:
minor
Tags:
#776902#5
Date:
2015-02-03 06:07:16 UTC
From:
To:
tmux leaves a socket behind in /tmp/tmux-1000/default on exit. It should
remove sockets that it created after it stops listening on them and then
rmdir the tmux-$uid directories that it created.

#776902#10
Date:
2015-02-03 11:00:14 UTC
From:
To:
Hi Paul,

Thanks for the report. I discussed this with upstream and we agree that
this is probably not worth fixing. Removing the server socket on exit
would be easy, but removing the directory would not because the deletion
can race with the startup of another server; doing this properly would
require some synchronization logic and since this is just cosmetic, we
think it's not worth the effort.

So I'm tagging this wontfix for now.

Cheers,

#776902#17
Date:
2017-11-16 17:00:01 UTC
From:
To:
With /run/user/$UID around, how about moving the socket there?

Regards,
Ondrej

#776902#22
Date:
2021-09-22 04:22:54 UTC
From:
To:
Hello,

Good morning,

We have gone through your samples from a partner and Here is our  Order
List. Please do bear in mind that we are very much in  need of this
order, quote your competitive prices.

Kindly send the Order confirmation.

Your early reply will be much appreciated.

Best Regards,

Maryanah Erwin.

PT FINDORA INTERNUSA

Jln Pahlawan 66 Kec. Arjawinangun

45162 CIREBON West-Java INDONESIA

tel : +62 231 357334

fax: +62 231 357260

email: marketing@findora.com

#776902#27
Date:
2024-01-01 10:47:57 UTC
From:
To:
Hi,

I have noticed that when there is no tmux session then the command
	$ tmux ls
gives
	$ no server running on /run/user/1000/tmux-1000/default

So it appears that a tmux-1000/default is expected.

Therefore the issue is not that ``tmux leaves a socket behind behing it'',
but exactly the contrary: tmux needs to leave a socket behind behing it.

Best wishes,
Jerome

#776902#32
Date:
2026-04-09 15:02:51 UTC
From:
To:
Hi,

contrary to Jerome's mail, on my Trixie system tmux is not interested in
/run/user.

~$ tmux ls
no server running on /tmp/tmux-501/default

IMHO it'd be a very good idea to either patch tmux, or ship an
/etc/profile.d/tmux.sh file that sets TMUX_TMPDIR to /run/user/$(id -u).
Long-term files under /tmp risk deletion, these days.