Cleaning Paths from non-necessary nodes

Is there a fast way to cleaning paths from non-necessary nodes rather than deleting it manually?

Not really, no.