We do development of new features behind feature flags, and have automated tools to help enable, disable and strip them. We're planning on moving to a model where we do an approximately annual "garbage collection" pass on the framework (corresponding with a major version bump) and simply nuke all of the code that has been deprecated since the last major version release.