A systemd service that is stuck shutting down holds on to its port, locks, and files until its processes end, and systemctl stop sits at the prompt in the meantime. The way out is a SIGKILL sent through the unit, which ends those processes at once and leaves the service stopped so the work behind it can continue.
A normal stop sends SIGTERM and waits for the service to exit. If it is still running when the stop timeout runs out, normally after 90 seconds, systemd sends SIGKILL on its own, so a slow shutdown usually ends without any help. Sending the signal by hand suits a service that cannot wait that long or a unit whose timeout has been turned off.
The --force option is not a shortcut, because systemctl stop --force only waits on the same stop job and sends no extra signal. Pressing Ctrl+C ends the waiting command but not the stop. queue-worker.service stands in for the real unit name, such as nginx.service or postgresql.service.
Steps to force stop a service using systemctl:
- Run a normal stop unless one is already waiting in another terminal.
$ sudo systemctl stop queue-worker.service
Start here even when the service looks stuck. Killing a service with no stop in progress counts as a crash, so a unit with Restart=always or Restart=on-failure starts straight back up.
- Check the stop from a second terminal on the same host.
$ systemctl status queue-worker.service ● queue-worker.service - Queue Worker Service Loaded: loaded (/etc/systemd/system/queue-worker.service; disabled; preset: enabled) Active: deactivating (stop-sigterm) since Fri 2026-11-06 14:26:08 UTC; 4s ago ##### snipped ##### Nov 06 14:26:08 server queue-worker[144]: queue-worker finishing current job Nov 06 14:26:08 server systemd[1]: Stopping queue-worker.service - Queue Worker Service...deactivating (stop-sigterm) means the service has been asked to stop and is still running. If its log lines show it finishing real work, letting the timeout run gives it the most time to end safely.
- Send SIGKILL to the service.
SIGKILL gives the service's processes no chance to clean up, so work in progress and unsaved data can be lost, and lock or PID files can be left behind.
$ sudo systemctl kill --signal=SIGKILL queue-worker.service
The signal reaches only this unit's processes, and the waiting systemctl stop in the first terminal returns once they are gone.
- Confirm that the service has stopped.
$ systemctl status queue-worker.service × queue-worker.service - Queue Worker Service Loaded: loaded (/etc/systemd/system/queue-worker.service; disabled; preset: enabled) Active: failed (Result: signal) since Fri 2026-11-06 14:26:13 UTC; 1s ago ##### snipped ##### Nov 06 14:26:13 server systemd[1]: queue-worker.service: Main process exited, code=killed, status=9/KILL Nov 06 14:26:13 server systemd[1]: queue-worker.service: Failed with result 'signal'. Nov 06 14:26:13 server systemd[1]: Stopped queue-worker.service - Queue Worker Service.failed is the expected record of a forced end, and the service can still start normally later. It reads Result: timeout when systemd sent the kill itself.
If it still reads deactivating with a CGroup: block after the kill, a process is probably blocked on hung storage. It cannot act on SIGKILL until that I/O returns, so the storage has to recover or the host has to be rebooted.