subtractDependencies function

Subtract dependencies