Remove unnecessary submodules.