diff --git a/src/core/unit.c b/src/core/unit.c index 180dccc2b2..d933bfc0cc 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5165,6 +5165,9 @@ void unit_remove_dependencies(Unit *u, UnitDependencyMask mask) { unit_add_to_gc_queue(other); + /* The unit 'other' may not be wanted by the unit 'u'. */ + unit_submit_to_stop_when_unneeded_queue(other); + done = false; break; }