Manual:NamespaceDupes.php

namespaceDupes.php is a located in the maintenance directory that can be used to clean up inaccessible titles after adding a  (or  prefix).

Usage
Go to the maintenance directory and run: php namespaceDupes.php --fix