Skip to main content

Hi,

I am looking for an Uninstaller for the Nextcloud App that also would remove the local cached Nextcloud Files.

Because the location of those cached Files can vary, do I have to check the Nextcloud preference file of each User to find out the right location?

Thanks for any help!

You should write one yourself. For several years I have used an app called AppCleaner (https://freemacsoft.net/appcleaner/) to perform uinstalls of apps. This app will also find all the caches, plists, and other files associated with the app I am uninstalling and it will list all of them and show their location. You could use AppCleaner to show you where all the bits and pieces are and then write a script that removes all of them, along with the app. Using AppCleaner to find the locations of all the files, I have written several uninstall scripts.


Something like this should work. I installed the app on a Mac VM and then ran this script on it after launching the app. I didn't login to anything. I just wanted to ensure that the app created all of its files for me to uninstall. I deleted the app as a separate step but you could probably include it in the "nextCloudFiles" variable. I used "rm -rf" for deleting files since that will work on either a file or a folder. Some of the paths are folders.

#!/bin/zsh currentUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }') nextCloudApp="/Applications/Nextcloud.app" nextCloudFiles=( "/Users/"$currentUser"/Library/Application Scripts/com.nextcloud.desktopclient" "/Users/"$currentUser"/Library/Caches/Nextcloud" "/Users/"$currentUser"/Library/Group Containers/com.nextcloud.desktopclient" "/Users/"$currentUser"/Library/HTTPStorages/com.nextcloud.desktopclient" "/Users/"$currentUser"/Library/HTTPStorages/com.nextcloud.desktopclient" "/Users/"$currentUser"/Library/LaunchAgents/com.nextcloud.desktopclient.plist" "/Users/"$currentUser"/Library/Preferences/Nextcloud" "/Users/"$currentUser"/Library/Preferences/com.nextcloud.desktopclient.plist" "/private/var/db/receipts/com.nextcloud.desktopclient.bom" "/private/var/db/receipts/com.nextcloud.desktopclient.plist" ) # Delete Nextcloud app echo "Deleting Next Cloud app" rm -rf "$nextCloudApp" # Delete Nextcloud user files for files in "${nextCloudFiles[@]}"; do echo "Deleting ${files}" rm -rf $files done