from pathlib import Path


def delete_absolute_prefix(path: str, prefix: str):
    """Delete a prefix of an absolute path.

    If the path is not absolute yet, it will be expanded.

    :param path: Path string to delete the prefix from
    :param prefix: Prefix to remove
    :return: The trimmed path
    """
    absolute = Path(path).absolute()
    return str(absolute).replace(prefix, "")