I have many "orphaned" dotnet templates that I have in my dotnet new
list.
They no longer exist on my drive because I've deleted the folders so I can't dotnet new --uninstall
.
Is there some way to remove all the orphaned dotnet templates from the list?
Proceed with Caution this is the only way I have found to clear these out.
dotnet new --debug:reinit
This command will clear all of your custom templates not just the orphaned template. So you will have to reinstall your valid templates after running the script.
If the folders still exist the better way to remove them would be to remove them one at a time using command below.
dotnet new --uninstall "C:\full\path\to\some-template-folder"