Sometimes you get a deployment running for hours and you cannot clear the state even with an FMC reload.
Login to FMC CLI and perform the following
expert
sudo su
Now check that the task is actual there using the following command
OmniQuery.pl -db mdb -e "select status,category,hex(uuid),body from notification where status=7;"
Use the following command to clear the pending deployment
OmniQuery.pl -db mdb -e "update notification set status=13 where status=7;"
If you want to delete the task use the following command, replacing the uuid value with the one that you want to delete
OmniQuery.pl -db mdb -e 'delete from notification where uuid=unhex("bb0bba970b4c4423927b8f7d237edd0b");'