Remove unneeded tasks.