Trim unused dependencies