Writing code is easy. Dealing with the the wrong dependencies down the line is hard, and can cost hundreds or thousands of hours to clean up when you suddenly need to. Spend time actively managing your dependencies - for any lasting software, this'll save both time, risk and money in the long run.
Through the years, I've stumbled across thousands of lines of unused code of all kinds. It might have been nice, well tested, neatly architected code fitting perfectly into all the tools, frameworks and standards for its time. But in the end, it was never called.
When we started our move from WCF to gRPC, among the first problems we had to solve was how we can share message types between contracts in different independent services living in separate repositories.
As part of migrating a fairly large (for our team size) code base into modern technologies, moving away from WCF as our internal communications protocol was essential, as WCF is not supported in modern .NET (.NET Core, if you like).
After investigating why our web app had rapidly rising memory consumption even with fairly low traffic after some simple changes, we found that creating a new ProxyGenerator for every time a service was invoked was the culprit.