from pathlib import Path
def remove_all_extensions(file_path: str) -> str:
"""
Remove all file extensions from a filename.
"""
path = Path(file_path)
while path.suffix:
path = path.with_suffix("")
return str(path)
# Example usage
print(remove_all_extensions("archive.tar.gz"))
'''
run:
archive
'''