Deactivate site templates when already deleted

If you’re having site templates in the ‘Create Site’ page that you want to be deleted but you can not find them in the solution gallery you can do the following in Powershell:

Get-SPFeature -Site http://SharePointSite/

You get a list of all the solutions on your site with their guids. To deactivate, run this command:

Disable-SPFeature –Identity FeatureIDHere  –url http://SharePointSite/