Remove unnecessary samples.