Remove modules which are no longer needed