LinuxCommandLibrary

systemctl-cancel

Cancel pending systemd jobs

TLDR

Cancel job by ID
$ systemctl cancel [job_id]
copy
Cancel multiple jobs
$ systemctl cancel [job_id1 job_id2 ...]
copy
Cancel all pending jobs
$ systemctl cancel
copy
Cancel user job
$ systemctl cancel [job_id] --user
copy

SYNOPSIS

systemctl cancel [JOB...]

DESCRIPTION

systemctl cancel cancels one or more pending jobs in the systemd service manager. Jobs represent pending operations like starting, stopping, or restarting units. When called without arguments, all pending jobs are cancelled.
Job IDs can be found using `systemctl list-jobs`. Cancelling a job aborts the pending operation without affecting the current state of the unit.

PARAMETERS

--user

Cancel jobs in the user service manager
--system
Cancel jobs in the system manager (default)

CAVEATS

Cannot cancel already completed jobs. Some jobs may have dependencies that restart them. Cancelling critical boot jobs may leave the system in an inconsistent state.

HISTORY

The cancel subcommand is part of systemctl in the systemd project. It provides control over the job queue that manages unit state transitions.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard