ros2 node list shows killed nodes: ros2 daemon stale entries, --no-daemon and daemon restart, measured
$ kill -9 12345 # the talker is gone
$ ros2 node list
/talker # still listed
$ ros2 node list --no-daemon
# empty
The opposite happens too: you start a node, run ros2 node list straight away, and the node isn't there yet. A dead node's topic stays in ros2 topic list in the same way.
Short answer: the stale entry comes from the ros2 daemon's cache, not from a process that's still running. A node that shuts down cleanly (Ctrl-C, kill, docker stop) left ros2 node list within about a second in my runs. A node killed with kill -9 or docker kill stayed listed for about 20 seconds with the default Fast DDS, and about 6 to 8 seconds with Cyclone DDS. That held on Humble, Jazzy and Lyrical. Either of these clears it at once:
ros2 node list --no-daemon # asks the network directly, no cache
ros2 daemon stop && ros2 daemon start # throws the cache away (0.85 to 1.18 s)
You can also wait about 20 seconds. --spin-time doesn't help while the daemon is running, because it was ignored. And --no-daemon has its own catch: with a node running the whole time, it missed that node in 4 of 15 calls.

Find your symptom
| What you see | Cause in my runs | What helped |
|---|---|---|
Node still listed after kill -9, docker kill or a crash |
The daemon keeps the entry until the DDS participant times out: about 20 s with Fast DDS, about 6 to 8 s with Cyclone DDS | --no-daemon, a daemon restart, or waiting |
Topic still in ros2 topic list after the publisher died |
The same cache and the same timeout | ros2 topic list --no-daemon |
Empty list right after ros2 daemon stop |
The new daemon's cache is empty for a second or two | Run the command again after a few seconds |
| A node you just started is missing | Discovery takes about 1 to 4 s. The daemon missed a new node at its first check in 2 of 24 starts | Run it again, or use --no-daemon --spin-time 1 |
Node missing with --no-daemon |
The default discovery wait is short | Add --spin-time 1 or more |
| Nodes from another terminal never show up | That shell has a different ROS_DOMAIN_ID |
Use the same domain id in both shells |
What I ran
On 2026-11-01 I used the official ros:humble-ros-base, ros:jazzy-ros-base and ros:lyrical-ros-base Docker images on a 2 vCPU Linux host, one distro after another. The node was a small rclpy talker written like the tutorials. It publishes on its own topic every 0.5 s, and on KeyboardInterrupt it calls destroy_node() and rclpy.try_shutdown(). I started it with python3 directly, not through ros2 run, so each signal went to the node itself.
For each case I started a fresh daemon and the talker, and waited until the talker appeared. Then I sent the signal. A loop then ran ros2 node list (through the daemon), ros2 node list --no-daemon and ros2 topic list -v about once a second for up to 60 seconds, logging the time since the signal. Every ros2 call starts a Python process, so one pass of the loop took about 1.7 to 2 s, and the times below are only that precise. "Gone at 20.75 s" means the node was still listed at the check before, at 19.04 s.
For the cross-container tests I put a second container on the same Docker bridge network and ran the talker as its main process. For Cyclone DDS I installed ros-<distro>-rmw-cyclonedds-cpp with apt and set RMW_IMPLEMENTATION=rmw_cyclonedds_cpp for both the daemon and the talker.
How long a killed node stays listed
The table shows the last check where the daemon still listed the node, and the first check where it was gone, in seconds after the signal. There are two runs per kill -9 row.
| How the node ended | Humble | Jazzy | Lyrical |
|---|---|---|---|
kill -INT (same as Ctrl-C), Fast DDS |
gone at first check, 0.58 | gone, 0.68 | gone, 0.74 |
kill -TERM, Fast DDS |
gone, 0.59 | gone, 0.66 | gone, 0.75 |
kill -9, Fast DDS |
19.04 / 20.75 and 18.63 / 20.35 | 18.39 / 20.27 and 18.40 / 20.27 | 19.19 / 21.13 and 17.47 / 19.43 |
docker stop, other container |
gone, 0.89 | gone, 1.04 | gone, 1.14 |
docker kill, other container |
17.54 / 19.25 | 18.77 / 20.78 | 19.69 / 21.65 |
kill -INT and kill -TERM, Cyclone DDS |
gone, 0.69 | gone, 0.77 to 0.78 | gone, 0.85 and 1.30 |
kill -9, Cyclone DDS |
4.90 / 6.62 and 5.01 / 6.72 | 5.37 / 7.24 (both runs) | 5.65 / 7.63 and 5.63 / 7.59 |
ros2 topic list followed the same pattern. After kill -9 the dead topic was gone at 18.8 to 21.3 s with Fast DDS (including docker kill) and 6.96 to 8.07 s with Cyclone DDS. After a clean stop it was gone within about 3 s. ros2 node list --no-daemon never showed a dead node in any row: it was empty at its first check, 1.4 to 2.3 s after the signal.
The pattern is the same everywhere. If the node gets to run its shutdown code, it tells the other participants it's leaving, and the daemon drops it at once. If the process dies first, nobody tells the daemon. It keeps the entry until the DDS participant's lease runs out, close to 20 seconds with Fast DDS and 6 to 8 seconds with Cyclone DDS here. A crash, an out-of-memory kill or a power cut on another machine should look like kill -9, but I didn't test those.
Two details from the logs. With SIGINT the talker didn't get a KeyboardInterrupt. rclpy's own signal handler shut down the context first, so rclpy.spin() raised ExternalShutdownException, and SIGTERM did the same on all three distros. The finally block still ran and the log ended with my "clean exit" line. Also, docker stop didn't wait out the 10-second grace period even though the talker was PID 1 in its container. rclpy handled the SIGTERM, so docker stop returned after 0.33 to 0.35 s and the node left the list normally.
A node that just started, or a daemon that just started
With no daemon running, the first ros2 node list starts one in the background and answers that call itself. The next calls go through the daemon. Each --no-daemon call does its discovery from scratch, so it's always slow:
| Call | Humble | Jazzy | Lyrical |
|---|---|---|---|
First ros2 node list, no daemon running |
0.96 s | 1.07 s | 1.10 s |
| Next calls, through the daemon | 0.30 to 0.31 s | 0.38 s | 0.43 to 0.50 s |
ros2 node list --no-daemon |
0.94 to 0.95 s | 1.04 to 1.05 s | 1.04 to 1.39 s |
ros2 daemon status printed either "The daemon is not running" or "The daemon is running" and exited with 0 both times. Don't use its exit code in a script.
Most of the "my node isn't listed" cases came right after the daemon started. With the talker running, I stopped the daemon and called ros2 node list every half second, twice per distro. On Humble the second call was empty in both repetitions:
rep 1 call 1 at +0.96 s after daemon stop, took 0.97 s -> [/talker_pre ]
rep 1 call 2 at +1.79 s after daemon stop, took 0.32 s -> []
rep 1 call 3 at +2.63 s after daemon stop, took 0.33 s -> [/talker_pre ]
The first call found the node because it did its own discovery. The second asked the new daemon, whose cache was still empty. On Jazzy and Lyrical it was the first call that came back empty, in one of the two repetitions:
rep 1 call 1 at +1.07 s after daemon stop, took 1.08 s -> []
rep 1 call 2 at +1.99 s after daemon stop, took 0.40 s -> [/talker_pre ]
Every list after about 2.7 s was complete on all three distros. If you've just restarted the daemon and the list is empty, wait a few seconds before you decide the node is down.
A node started while the daemon is already running has to be discovered first. The daemon's first check, about 0.5 to 0.8 s after the start, missed the new node in 2 of 24 starts (one on Humble, one on Lyrical) and had it at the next check. On Jazzy the first --no-daemon check at 1.75 s missed a new node twice. A talker in another container took longer: the daemon didn't list it at 1.09 s (Humble), 1.30 s (Jazzy) or 1.49 s (Lyrical), and listed it at 2.99, 3.45 and 4.06 s.
--no-daemon and --spin-time
--no-daemon always gave a fresh view, but not always a complete one. With one talker running the whole time, I ran five --no-daemon calls in a row on each distro. It missed the node in 2 of 5 calls on Humble, none on Jazzy and 2 of 5 on Lyrical. Each call waits only about a second for discovery, and sometimes that isn't enough.
--spin-time sets how long the CLI waits for discovery when it does the discovery itself. With the daemon stopped:
| Command (daemon stopped) | Humble | Jazzy | Lyrical |
|---|---|---|---|
ros2 node list --spin-time 0 |
0.85 s, missed | 1.06 s, missed | 1.22 s, missed |
ros2 node list --spin-time 1 |
2.07 s, found | 2.27 s, found | 2.60 s, found |
ros2 node list --spin-time 3 |
3.78 s, found | 4.01 s, found | 4.19 s, found |
With the daemon running, the option did nothing. Right after a kill -9, ros2 node list --spin-time 5 returned in 0.30 s (Humble), 0.38 s (Jazzy) or 0.41 s (Lyrical) and still listed the dead node. This fits ros2cli issue #164, which reports that --spin-time behaves differently depending on whether the daemon is running. For a slower but more complete look, use it together with --no-daemon.
ROS_DOMAIN_ID and RMW mismatches
There's one daemon per domain. With a talker and a daemon running on domain 0, a shell with ROS_DOMAIN_ID=5 printed an empty list, with and without --no-daemon. ros2 daemon status said "The daemon is running" in both shells. On Lyrical I also listed the processes: there were two daemons, one started with --ros-domain-id 0 and one with --ros-domain-id 5, so the domain 5 call had started its own. (On Humble and Jazzy my process match missed the daemon, so I only have the list output there, which was the same.) I then started a second talker on domain 5, and each shell listed only its own talker on all three distros. Changing ROS_DOMAIN_ID in your shell never shows you the old domain's cache. If a node is missing, compare echo $ROS_DOMAIN_ID in both terminals first.
For RMW I tried one mismatch. A daemon started with the default Fast DDS listed a talker running on Cyclone DDS. A shell set to Cyclone listed it too, with and without the daemon. The result was the same on all three distros, so in this setup the RMW mismatch didn't hide anything.
Whether nodes on other machines show up at all is a separate question; I measured it in ROS_LOCALHOST_ONLY vs ROS_AUTOMATIC_DISCOVERY_RANGE, measured on eth0.
Fix options compared
Each row starts from the same state: a talker killed with kill -9 half a second earlier, with Fast DDS. The results were the same on all three distros. Only the times differ.
| What I did | Cost (Humble / Jazzy / Lyrical) | Dead node gone? |
|---|---|---|
Nothing: ros2 node list about 0.9 s after the kill |
0.31 / 0.38 / 0.42 s | no, gone after about 20 s |
ros2 node list --no-daemon |
0.94 / 1.04 / 1.06 s | yes |
ros2 daemon stop, ros2 daemon start, then ros2 node list three times |
restart 0.85 / 1.11 / 1.18 s | yes, in all three calls |
ros2 node list --spin-time 5 with the daemon running |
0.30 / 0.38 / 0.41 s | no |
ros2 topic list --no-daemon |
about 1 s | yes, the topic was gone |
Stop the node with Ctrl-C or kill instead of kill -9 |
- | yes, at the first check |
Choose by what you need. For a quick look after a crash, --no-daemon is simplest. In a script that must not miss a live node, use --no-daemon --spin-time 1 or more and accept the extra second. Restarting the daemon clears dead entries, but the first call or two afterwards can come back empty while it rediscovers the graph. The real fix comes before the CLI: stop nodes with SIGINT or SIGTERM so they announce that they're leaving, and keep kill -9 for processes that don't respond.
Restarting the daemon is also the most common forum answer, for example in ROS2 topic list only working once and ros2 humble to kill the zombie node. If a node is still listed well after 20 seconds and a restart doesn't clear it, the process is probably still running somewhere, on another machine or in another container on the same domain. In my runs a stale cache never outlasted the timeouts above.
Version notes
The behavior was the same on Humble, Jazzy and Lyrical: the same stale times, the same exceptions and the same effect from each fix. Two things differed. Calls got a little slower on newer distros, as the tables show. And the empty call after a daemon restart was the second call on Humble but the first call on Jazzy and Lyrical. Fast DDS went from 2.6.12 (Humble) to 2.14.7 (Jazzy) to 3.6.2 (Lyrical), and Cyclone DDS from 0.10.5 (Humble, Jazzy) to 11.0.1 (Lyrical), without changing the timeouts noticeably.
Not tested
Nodes started with ros2 run or ros2 launch, where Ctrl-C also reaches a wrapper process. C++ nodes. Nodes on another physical machine, a pulled network cable, a real crash or an out-of-memory kill. Changed lease durations in a Fast DDS XML profile or a Cyclone DDS config. Discovery Server, ROS_LOCALHOST_ONLY and ROS_AUTOMATIC_DISCOVERY_RANGE. The daemon's 2-hour inactivity timeout. Foxy, Iron and Rolling.
If nodes in different machines or containers never see each other at all, that's a discovery range problem rather than a cache problem. I measured that in ROS 2 nodes can't see each other.
FAQ
Why does ros2 node list still show a node I killed?
The ros2 daemon caches the graph. A node killed with kill -9 or docker kill can't announce that it's leaving, so the daemon keeps it until the DDS lease runs out. That took about 20 s with Fast DDS and 6 to 8 s with Cyclone DDS on Humble, Jazzy and Lyrical. A node stopped with Ctrl-C or kill was gone at the first check.
How do I remove a stale node from ros2 node list?
Run ros2 node list --no-daemon to see the graph without the cache, or run ros2 daemon stop and ros2 daemon start to clear it. Both removed a node killed with kill -9 on every distro I tested. Waiting about 20 seconds also works.
Why is my node missing from ros2 node list right after I start it?
Discovery takes time. The daemon's first check, under a second after the start, missed a new node in 2 of 24 starts and found it at the next check. Right after a daemon restart, one call came back empty. Run the command again after a few seconds.
Does --spin-time fix stale entries?
No, not while the daemon is running. ros2 node list --spin-time 5 returned in under half a second and still listed the dead node. With the daemon stopped or with --no-daemon, --spin-time 1 found the running node on every distro and --spin-time 0 missed it.
Is --no-daemon always correct?
It never showed a dead node, but it missed a live one in 4 of 15 calls because it waits only about a second for discovery. Use --no-daemon --spin-time 1 when the list has to be complete.
Measured on 2026-11-01 on a 2 vCPU Linux host with ros:humble-ros-base (sha256:d9bcf2e6f72d..., ros2cli 0.18.20, rclpy 3.3.22, rclcpp 16.0.21, rmw_fastrtps_cpp 6.2.10 with Fast DDS 2.6.12, rmw_cyclonedds_cpp 1.3.5 with Cyclone DDS 0.10.5), ros:jazzy-ros-base (sha256:8eed0a4669bb..., ros2cli 0.32.13, rclpy 7.1.12, rclcpp 28.1.22, rmw_fastrtps_cpp 8.4.4 with Fast DDS 2.14.7, rmw_cyclonedds_cpp 2.2.4 with Cyclone DDS 0.10.5) and ros:lyrical-ros-base (sha256:3224ee150cb0..., ros2cli 0.40.9, rclpy 10.0.11, rclcpp 32.0.3, rmw_fastrtps_cpp 9.4.10 with Fast DDS 3.6.2, rmw_cyclonedds_cpp 4.1.5 with Cyclone DDS 11.0.1). Full digests are in digests.txt.
Script and raw output: evidence folder. Questions this answers: ros2 humble to kill the "zombie" node, ROS2 topic list only working once (or any other command), How do you kill the "zombie" node in ROS2 on local?, Nodes missing from ros2 node list after relaunch, ros2 node list --spin-time inconsistent behavior if daemon is started or stopped.