login ambari database and find out tasking ID required to clean up:
select task_id,role,role_command from host_role_command where status='IN_PROGRESS';
select task_id,role,role_command from host_role_command where status='QUEUED';
select task_id,role,role_command from host_role_command where status='PENDING';
update identified task_id to aborted status:
update host_role_command set status='ABORTED' where task_id in (264,266);