Skip to content

Instantly share code, notes, and snippets.

@akhildevelops
Created December 28, 2024 06:52
Show Gist options
  • Save akhildevelops/5205f1e5492c030e45d7590d7349d8ab to your computer and use it in GitHub Desktop.
Save akhildevelops/5205f1e5492c030e45d7590d7349d8ab to your computer and use it in GitHub Desktop.
Uninstall ghostty
#!/usr/bin/env python3
# Licensed under the MIT license.
# See https://opensource.org/licenses/MIT for license details.
import sys
import os
from pathlib import Path
def main():
if len(sys.argv)>1:
PREFIX = Path(sys.argv[1])
else:
PREFIX = Path(f"{os.environ['HOME']}/.local")
# Delete Directories/binary ending with ghostty
for path in PREFIX.rglob("*ghostty"):
os.system(f"rm -r {path}")
# Delete ghostty files
for path in PREFIX.rglob("*ghostty*.*"):
os.system(f"rm {path}")
if __name__=="__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment