Remove the unnecessary pages.