def METHOD_NAME(cached_dir, dependency_list):
    # get directory structure
    for root, dirs, files in os.walk(cached_dir):
        for file in files:
            file_full_path = os.path.join(root, file)
            logging.debug("dependency in cache folder: [%s]", file_full_path)
            if file_full_path not in dependency_list:
                # delete from cache
                os.remove(file_full_path)
                logging.debug(
                    "deleted unused dependency [%s] from [%s]...", file_full_path, root
                )