Remove redundant dependencies.