First of all, make sure you have a working backup since this method is potentially destructive! I am not responsible for any data loss or broken configurations in your environment. I've run into a situation where multiple tasks (~8.000) tasks were stuck in execution over the course of a week. Canceling them by hand will take me forever and the WebUI is non-responsive when selecting this amount of tasks, so foreman-rake to the rescue it is. Start by finding out the label of the process you are going to stop: [root@katello ~]# su - postgres -c "psql -d foreman -c 'select label,state,result from foreman_tasks_tasks where state = '\''running'\'' and result = '\''pending'\''';" For me the label was 'Actions::RemoteExecution::RunHostJob'. Here're all the details I was searching for using foreman-rake: label: 'Actions::RemoteExecution::RunHostJob' state: 'running' or 'pending' result: ...