Remove the unnecessary tasks.