Beispiel #1
0
def UninstallChrome(passw):
    print("Uninstalling Chrome...")

    cfg_file = 'com.google.Chrome*'
    recents = 'com.google.chrome*'
    app_dir = 'Google Chrome.app'
    support_dir = 'Google/Chrome'
    brewname = 'google-chrome'
    additional_dirs = [
        '/Library/Google/Google Chrome Brand*',
        os.path.join(os.path.expanduser('~'),
                     'Library/Google/Google Chrome Brand*'),
        os.path.join(os.path.expanduser('~'),
                     'Library/WebKit/com.google.Chrome*'),
    ]

    util.remove_app(
        [cfg_file, app_dir, support_dir, recents],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #2
0
def UninstallSkype(passw):
    print("Uninstalling Skype...")

    cfg_file = 'com.skype.skype*'
    app_dir = 'Skype.app'
    support_dir = 'Skype*'
    other = [
        'ByHost/com.skype.skype*',
        'T/Skype*',
        'CrashReporter/Skype*',
    ]
    brewname = 'skype'
    additional_dirs = [
        os.path.join(os.path.expanduser('~'),
                     'Library/Address Book Plug-Ins/Skype*'),
        os.path.join(os.path.expanduser('~'),
                     'Library/WebKit/com.skype.skype*'),
    ]

    util.remove_app(
        [cfg_file, app_dir, support_dir] + other,
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #3
0
def UninstallPython3(passw):
    print("Uninstalling Python3...")

    brewname = 'python3'
    package_dir_name = 'python'

    install_dir = os.path.join(util.get_brew_cellar(), package_dir_name)

    pkg_names = list(set(util.get_symlinks(
        util.PKG_SYMLINK_DIRS,
        [util.get_file_with_parents(install_dir, 1)],
        # basename=False
    )))
    if not pkg_names:
        return

    additional_dirs = [
        install_dir
    ]

    util.remove_app(pkg_names, passw,
                    misc_files_and_dirs=additional_dirs,
                    brewname=brewname,
                    std_dirs=util.PKG_SYMLINK_DIRS,
                    cask=False,
                    #                 debug=True,
                    #                 nobrew=True,
                    #                 ext_verbose=True,
                    )
    util.remove_from_path(['/', 'usr', 'local', 'lib',
                           'python3.7', 'site-packages'])
Beispiel #4
0
def UninstallARMGCC(passw):
    print("Uninstalling ARM GCC (arm-none-eabi-gcc)...")

    brewname = 'arm-none-eabi-gcc'
    brewtap = 'ARMmbed/homebrew-formulae'

    install_dir = os.path.join(util.get_brew_cellar(), brewname)

    pkg_names = list(set(util.get_symlinks(
        util.PKG_SYMLINK_DIRS,
        [util.get_file_with_parents(install_dir, 1)],
        # basename=False
    )))
    if not pkg_names:
        return

    additional_dirs = [
        install_dir
    ]

    util.remove_app(pkg_names, passw,
                    misc_files_and_dirs=additional_dirs,
                    brewname=brewname,
                    std_dirs=util.PKG_SYMLINK_DIRS,
                    cask=False,
                    tap=brewtap,
                    #                 debug=True,
                    #                 nobrew=True,
                    #                 ext_verbose=True,
                    )
Beispiel #5
0
def UninstallScons(passw):
    print("Uninstalling Scons...")

    brewname = 'scons'

    install_dir = os.path.join(util.get_brew_cellar(), brewname)

    pkg_names = list(set(util.get_symlinks(
        util.PKG_SYMLINK_DIRS,
        [util.get_file_with_parents(install_dir, 1)],
        # basename=False
    )))
    if not pkg_names:
        return

    additional_dirs = [
        install_dir
    ]

    util.remove_app(pkg_names, passw,
                    misc_files_and_dirs=additional_dirs,
                    brewname=brewname,
                    std_dirs=util.PKG_SYMLINK_DIRS,
                    cask=False,
                    #                 debug=True,
                    #                 nobrew=True,
                    #                 ext_verbose=True,
                    )
Beispiel #6
0
def UninstallSlack(passw):
    print("Uninstalling Slack...")

    cfg_file = 'com.tinyspeck.slackmacgap*'
    app_dir = 'Slack.app'
    support_dir = 'Slack'
    brewname = 'slack'
    additional_dirs = []

    util.remove_app(
        [cfg_file, app_dir, support_dir],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #7
0
def UninstallGIMP(passw):
    print("Uninstalling GIMP...")

    cfg_file = 'org.gnome.gimp*'
    app_dir = 'GIMP-2.10.app'
    support_dir = 'Gimp'
    brewname = 'gimp'
    additional_dirs = []

    util.remove_app(
        [cfg_file, app_dir, support_dir],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #8
0
def UninstallRocketChat(passw):
    print("Uninstalling Rocket Chat...")

    cfg_file = 'chat.rocket*'
    app_dir = 'Rocket.Chat.app'
    support_dir = 'Rocket.Chat'
    brewname = 'rocket-chat'
    additional_dirs = []

    util.remove_app(
        [cfg_file, app_dir, support_dir],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #9
0
def UninstallLibreOffice(passw):
    print("Uninstalling Libre Office...")

    cfg_file = 'org.libreoffice*'
    app_dir = 'LibreOffice.app'
    support_dir = 'LibreOffice'
    brewname = 'libreoffice'
    additional_dirs = []

    util.remove_app(
        [cfg_file, app_dir, support_dir],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #10
0
def UninstallVLC(passw):
    print("Uninstalling VLC...")

    cfg_file = 'org.videolan.vlc*'
    app_dir = 'VLC.app'
    support_dir = 'VLC'
    brewname = 'vlc'
    additional_dirs = []

    util.remove_app(
        [cfg_file, app_dir, support_dir],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #11
0
def UninstallSpotify(passw):
    print("Uninstalling Spotify...")

    cfg_file = 'com.spotify.client*'
    app_dir = 'Spotify.app'
    support_dir = 'Spotify'
    brewname = 'spotify'
    additional_dirs = []

    util.remove_app(
        [cfg_file, app_dir, support_dir],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #12
0
def UninstallVSCode(passw):
    print("Uninstalling Visual Studio Code...")

    cfg_file = 'com.microsoft.VSCode*'
    recents = 'com.microsoft.vscode*'
    app_dir = 'Visual Studio Code.app'
    support_dir = 'Code'
    brewname = 'visual-studio-code'
    additional_dirs = [os.path.join(os.path.expanduser('~'), '.vscode')]

    util.remove_app(
        [cfg_file, app_dir, support_dir, recents],
        passw,
        misc_files_and_dirs=additional_dirs,
        brewname=brewname,
        #                 debug=True,
        #                 nobrew=True,
        #                 ext_verbose=True,
    )
Beispiel #13
0
def UninstallGolang(passw):
    print("Uninstalling Golang...")

    brewname = 'go'

    install_dir = os.path.join(util.get_brew_cellar(), brewname)

    pkg_names = list(set(util.get_symlinks(
        util.PKG_SYMLINK_DIRS,
        [util.get_file_with_parents(install_dir, 1)],
        # basename=False
    )))
    if not pkg_names:
        return

    additional_dirs = [
        install_dir
    ]

    util.remove_app(pkg_names, passw,
                    misc_files_and_dirs=additional_dirs,
                    brewname=brewname,
                    std_dirs=util.PKG_SYMLINK_DIRS,
                    cask=False,
                    #                 debug=True,
                    #                 nobrew=True,
                    #                 ext_verbose=True,
                    )

    # removing enviroment variables from .bash_profile
    # Deliberately not removing 'GOPATH' since it might
    # be changed to a custom path
    util.remove_env_var('GOROOT',
                        #  'GOPATH',
                        )
    util.remove_from_path(['${GOROOT}', 'bin'],
                          ['${GOPATH}', 'bin'])