Created
December 28, 2024 06:52
-
-
Save akhildevelops/5205f1e5492c030e45d7590d7349d8ab to your computer and use it in GitHub Desktop.
Uninstall ghostty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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