Selur's Little Message Board
[HELP] General Mac OS usage questions :) - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html)
+--- Forum: A/V Talk (https://forum.selur.net/forum-6.html)
+--- Thread: [HELP] General Mac OS usage questions :) (/thread-1539.html)



General Mac OS usage questions :) - Selur - 20.09.2020

Thought I open a thread where I post general Mac OS questions in the hope some of the Mac users can help.

First question:
Is there a "build-in" uninstall somewhere in Mac OS or is it still necessary to remove the content of pkg files manually ?

iirc one can do it manually by using:
pkgutil --pkgs | grep Hybrid
to find the Hybrid packages
pkgutil --pkg-info the-package-name.pkg
to get the files theat were installed
pkgutil --only-files --files the-package-name.pkg | tr '\n' '\0' | xargs -n 1 -0 sudo rm -f
pkgutil --only-dirs --files the-package-name.pkg | tail -r | tr '\n' '\0' | xargs -n 1 -0 sudo rmdir
to remove the files.
sudo pkgutil --forget the-package-name.pkg
to remove the package info.

so another related question:
In case there is no "build-in" uninstall graphical user interface in Mac OS, is there some recommend (no limited to X uninstalls) freeware to do the job?

Cu Selur


RE: General Mac OS usage questions :) - shijan - 21.09.2020

There is no system wide uninstaller on mac. So some garbage stays in system when you delete app from applications folder manually.
There is useful app https://freemacsoft.net/appcleaner/ It can delete folders and plist files related to app.
There is also easyfind app that may help to search for real and system/hidden files https://www.macupdate.com/app/mac/11076/easyfind

Sometimes dvelopers include uninstall script if required to delete some special files. As example Vapoursynth installer uninstall.command

#!/bin/bash
#VapourSynth Uninstall Script


clear
while true; do
    read -p "Do you want to uninstall VapourSynth (y/n)? " -n 1 yn
    echo
    case $yn in
        [Yy]* ) break;;
        [Nn]* ) clear; echo "Uninstall canceled, exiting..."; exit;;
        * ) clear ; echo "Please answer yes or no.";;
    esac
done

if test -e /usr/local/bin/ffmsindex; then sudo rm -rf /usr/local/bin/ffmsindex && echo "Link to ffmsindex was removed."; else echo "Link to ffmsindex was already removed."; fi
if test -e /usr/local/bin/vspipe; then sudo rm -rf /usr/local/bin/vspipe && echo "Link vspipe was removed."; else echo "Link vspipe was ralready removed."; fi
if test -e /usr/local/bin/vspip3; then sudo rm -rf /usr/local/bin/vspip3 && echo "Link vspip3 was removed."; else echo "Link vspipe was ralready removed."; fi
if test -e /usr/local/bin/vspython; then sudo rm -rf /usr/local/bin/vspython && echo "Link to vspython was removed."; else echo "Link vspython was ralready removed."; fi
if test -e /usr/local/bin/removevs; then sudo rm -rf /usr/local/bin/removevs && echo "Link to removevs was removed."; else echo "Link vspython was ralready removed."; fi

if test -d /usr/local/include/vapoursynth; then sudo rm -rf /usr/local/include/vapoursynth && echo "Link to VapourSynth includes was removed."; else echo "Link to VapourSynth includes was already removed."; fi

if test -e /usr/local/lib/libvapoursynth-script.dylib; then sudo rm -rf /usr/local/lib/libvapoursynth-script.dylib && echo "Link to VapourSynth Script library was removed."; else echo "Link to VapourSynth Script library was already removed."; fi
if test -e /usr/local/lib/libvapoursynth-script.0.dylib; then sudo rm -rf /usr/local/lib/libvapoursynth-script.0.dylib && echo "Link to VapourSynth Script library was removed."; else echo "Link to VapourSynth Script library was already removed."; fi
if test -e /usr/local/lib/libvapoursynth.dylib; then sudo rm -rf /usr/local/lib/libvapoursynth.dylib && echo "Link to VapourSynth library was removed."; else echo "Link to VapourSynth library was already removed."; fi

if test -d /Library/Frameworks/VapourSynth.framework; then sudo rm -rf /Library/Frameworks/VapourSynth.framework && echo "VapourSynth framework was removed."; else echo "VapourSynth framework was already removed."; fi

if test -d $HOME/Desktop/VapourSynth; then sudo rm -rf $HOME/Desktop/VapourSynth && echo "VapourSynth desktop shortcuts were removed."; else echo "VapourSynth desktop shortcuts were already removed."; fi    

echo "Uninstall complete, exiting..."

Also for faster navigation it may help to Always Show the User Library Folder https://osxdaily.com/2014/12/16/show-user-library-folder-os-x-yosemite/


RE: General Mac OS usage questions :) - Selur - 21.09.2020

Quote:There is no system wide uninstaller on mac.
What a shame. Sad


RE: General Mac OS usage questions :) - shijan - 21.09.2020

Is there any system build-in uninstaller on on Linux? Smile


RE: General Mac OS usage questions :) - Selur - 21.09.2020

Yes. They are called package managers.
Anything that is installed using the package manager usually can be uninstalled using the package manager.
So when you make an installer package, on Ubuntu .deb package you can install it through the package manager and uninstall it through the package manager.
It's similar to the app store but more open, since it you can add/remove stuff that isn't under the control of the one maintaining the system repository.
So it's basically like the app store, but folks can add installers their software that can be installed using the 'app store' without having to register with the maintainer of the OS. Wink

Sure you can always install stuff on the OS which doesn't use the package manager, but the developers at least can create packages that use it to install/deinstall stuff. Main problem on Linux is that different distributions Suse/Arch Linux/Debian/... use their own package manager, so as a developer you either give up on the package manager or create an installer for each distribution. (I gave up on it, since I don't have the time to maintain it.)
On Mac OS where there is only one 'package manager' (the app store) I was hoping that the app store had some interface to pkgutil or that there was some wide spread (free) solution for it. I saw that here are multiple tools in the app store that offer to uninstall stuff installed through pkg files, but none of them seemed like 'the' (free) solution. Smile

Cu Selur


RE: General Mac OS usage questions :) - shijan - 21.09.2020

Ok. Smile
To be honest i never see problem with uninstaller:
- For basic simple apps it is way simpler just delete app from hard drive folder and just don't care about some additional txt files left in system. It even have advantage - if for some reason you install later same app, all preferences and window size settings will be the same.

- For more clean install there is appcleaner and some other similar tools.

- More complicated apps like Davinci Resolve or Adobe that designed not exact in normal "app + plist + app support folder" guidelines usually include it's own uninstaller script. Sometimes (mostly in past) that script may be a part of PKG installer, so you may see button UNINSTALL there.

Or for example here is Davinci Resolve script placed inside Uninstall.app wrapper:

[Image: y49G7u5.jpg]

#!/bin/sh

# unconfigure panel
"/Library/Application Support/Blackmagic Design/DaVinci Resolve/configure-panel.sh" none

# unconfigure dp
"/Library/Application Support/Blackmagic Design/DaVinci Resolve/configure-dp.sh" off

# DO NOT blow away application support and prefs
# /bin/rm -rf "/Library/Application Support/Blackmagic Design/DaVinci Resolve/"
# /bin/rm -rf "/Library/Preferences/Blackmagic Design/DaVinci Resolve/"

# Application
/bin/rm -rf "/Applications/DaVinci Resolve.app"
/bin/rm -rf "/Applications/DaVinci Resolve/"

# Panels
/bin/rm -rf "/Library/Frameworks/DaVinciPanelAPI.framework"
/bin/rm -rf "/Library/Application Support/Blackmagic Design/DaVinci Resolve Panels/AdminUtility"
/bin/rmdir "/Library/Application Support/Blackmagic Design/DaVinci Resolve Panels"

# Fairlight Panels
/bin/rm -rf "/Library/Frameworks/FairlightPanelAPI.framework"

exit 0



RE: General Mac OS usage questions :) - l33tmeatwad - 21.09.2020

The thing about macOS is they tried to design it to be "easy" for most users by having .app files that should theoretically contain all the files needed so if a user deletes that the application is "uninstalled". In reality this is not always the case, even for stuff from major developers like Adobe or Google.