def remove_repository(self, path=None, removeEmptyDirs=True):
assert isinstance(removeEmptyDirs, bool), "<STR_LIT>"<EOL>if path is not None:<EOL><INDENT>if path != self.__path:<EOL><INDENT>repo = Repository()<EOL>repo.load_repository(path)<EOL><DEDENT>else:<EOL><INDENT>repo = self<EOL><DEDENT><DEDENT>else:<EOL><INDENT>repo = self<EOL><DEDENT>assert repo.path is not None, "<STR_LIT>"<EOL>for fdict in reversed(repo.get_repository_state()):<EOL><INDENT>relaPath   = list(fdict)[<NUM_LIT:0>]<EOL>realPath   = os.path.join(repo.path, relaPath)<EOL>path, name = os.path.split(realPath)<EOL>if fdict[relaPath]['<STR_LIT:type>'] == '<STR_LIT:file>':<EOL><INDENT>if os.path.isfile(realPath):<EOL><INDENT>os.remove(realPath)<EOL><DEDENT>if os.path.isfile(os.path.join(repo.path,path,self.__fileInfo%name)):<EOL><INDENT>os.remove(os.path.join(repo.path,path,self.__fileInfo%name))<EOL><DEDENT>if os.path.isfile(os.path.join(repo.path,path,self.__fileLock%name)):<EOL><INDENT>os.remove(os.path.join(repo.path,path,self.__fileLock%name))<EOL><DEDENT>if os.path.isfile(os.path.join(repo.path,path,self.__fileClass%name)):<EOL><INDENT>os.remove(os.path.join(repo.path,path,self.__fileClass%name))<EOL><DEDENT><DEDENT>elif fdict[relaPath]['<STR_LIT:type>'] == '<STR_LIT>':<EOL><INDENT>if os.path.isfile(os.path.join(realPath,self.__dirInfo)):<EOL><INDENT>os.remove(os.path.join(realPath,self.__dirInfo))<EOL><DEDENT>if os.path.isfile(os.path.join(realPath,self.__dirLock)):<EOL><INDENT>os.remove(os.path.join(realPath,self.__dirLock))<EOL><DEDENT>if not len(os.listdir(realPath)) and removeEmptyDirs:<EOL><INDENT>shutil.rmtree( realPath )<EOL><DEDENT><DEDENT><DEDENT>if os.path.isfile(os.path.join(repo.path,self.__repoFile)):<EOL><INDENT>os.remove(os.path.join(repo.path,self.__repoFile))<EOL><DEDENT>if os.path.isfile(os.path.join(repo.path,self.__repoLock)):<EOL><INDENT>os.remove(os.path.join(repo.path,self.__repoLock))<EOL><DEDENT>
Remove all repository from path along with all repository tracked files.

:Parameters:
    #. path (None, string): The path the repository to remove.
    #. removeEmptyDirs (boolean): Whether to remove remaining empty
       directories.