I’ve been having some trouble with this lately as well. I had a case where I needed to change the tank name on a project but then I would get an error when trying to open apps because the project directories were still registered.
I tried to unregister the project level directories as above but that didn’t seem to work.
In the end I found that the project name is cached in the .shotgun folder in a file called pipeline_configuration.yml. I deleted the folder accociated with the specific pipeline config and reloaded the config and everything went through ok.
Fortunately for me it was a new project so I didn’t have a bunch of artists with broken configs.
My take away is don’t edit the tank name after anyone has loaded the config!