def METHOD_NAME(first=True):
    # If a old path exists then perform migration.
    cache_root = save_cache_path('')
    for source, destination in CacheManager.migrate_paths():
        if not os.path.exists(source):
            continue
        if first:
            print('> migrating caches', file=sys.stderr)
            # Move existing dir out of the way in order to nest.
            cache_moved = CacheManager.directory() + '-main'
            if not os.path.exists(cache_moved):
                os.rename(CacheManager.directory(), cache_moved)
            # Detected need to migrate, but may have already passed -main.
            CacheManager.METHOD_NAME(False)
            return
        # If either incompatible format, explicit removal, or newer source
        # was already migrated remove the cache entirely.
        if destination and os.path.exists(destination):
            # Set to None to make clear in message.
            destination = None
        print(
            '> - {} -> {}'.format(
                os.path.relpath(source, cache_root),
                os.path.relpath(destination, cache_root) if destination else None),
            file=sys.stderr)
        if not destination:
            shutil.rmtree(source)
            continue
        # Ensure parent directory exists and then move within.
        destination_parent = os.path.dirname(destination)
        if not os.path.exists(destination_parent):
            os.makedirs(destination_parent)
        os.rename(source, destination)