Need to remove all legacy templates from SDL 2011 SP1 before upgrading to Sites 9 . Suggest options to perform the same and with some references .
To remove legacy templates in SDL Tridion 2011, select the templates in their originating Publication and delete them.
Consider creating a Content Porter export or a database backup of the Content Manager before proceeding.
If the templates are in use you will need to remove the references before deleting them. This may include unpublishing Pages and Component that use the templates (or replacing the templates and publishing), unlocalizing items lower in the BluePrint, and possibly removing history. Attempting to delete an item will report back either success or the references that prevent the deletion.