def action_cache_reset():
    """
    Delete all contents from cache folder
    Then re-generate cached version of all models in the local repo

    """
    printDebug("""The existing cache will be erased and recreated.""")
    printDebug(
        """This operation may take several minutes, depending on how many files exist in your local library."""
    )
    ONTOSPY_LOCAL_MODELS = get_home_location()
    # https://stackoverflow.com/questions/185936/how-to-delete-the-contents-of-a-folder-in-python
    # NOTE This will not only delete the contents but the folder itself as well.
    shutil.rmtree(ONTOSPY_LOCAL_CACHE_TOP)

    var = input(Style.BRIGHT + "=====\nProceed? (y/n) " + Style.RESET_ALL)
    if var == "y":
        repo_contents = get_localontologies()
        print(Style.BRIGHT +
              "\n=====\n%d ontologies available in the local library\n=====" %
              len(repo_contents) + Style.RESET_ALL)
        for onto in repo_contents:
            fullpath = ONTOSPY_LOCAL_MODELS + "/" + onto
            try:
                print(Fore.RED + "\n=====\n" + onto + Style.RESET_ALL)
                print("Loading graph...")
                g = Ontospy(fullpath)
                print("Loaded ", fullpath)
            except:
                g = None
                print(
                    "Error parsing file. Please make sure %s contains valid RDF."
                    % fullpath)

            if g:
                print("Caching...")
                do_pickle_ontology(onto, g)

        print(Style.BRIGHT + "===Completed===" + Style.RESET_ALL)

    else:
        print("Goodbye")
Delete all contents from cache folder
    Then re-generate cached version of all models in the local repo