Remove unneeded extensions.