Skip to content

Instantly share code, notes, and snippets.

@faeliaso
Forked from kigster/fabfilter-remover.sh
Created March 14, 2021 22:37
Show Gist options
  • Select an option

  • Save faeliaso/5d1b845159c66be6564aac2f50dc664e to your computer and use it in GitHub Desktop.

Select an option

Save faeliaso/5d1b845159c66be6564aac2f50dc664e to your computer and use it in GitHub Desktop.
Script to find and remove FabFilter plugins on Mac OS-X. Requires Terminal usage.
#!/usr/bin/env bash
if [[ ! -L lib || ! -L bootstrap ]]; then
[[ -z $(which curl) ]] && {
printf "Curl is required for this operation. Please install it with\n"
printf "brew install curl\n"
exit 1
}
curl -fsSL "http://bit.ly/bashmatic-bootstrap" | /usr/bin/env bash
fi
[[ -f lib/Loader.bash ]] && source lib/Loader.bash
export find_command=
export fabfilter_backup_location="/tmp/fabfilter"
export dry_run=0
export prefix=""
usage() {
printf "\nUSAGE:\n"
printf " $0 [ uninstall | delete | remove ] [ -n | --dry-run ] \n"
printf " $0 [ show | list ] [ -n | --dry-run ]\n"
printf " $0 [ backup ] [ -n | --dry-run ]\n\n"
printf "\nDESCRIPTION\n"
printf " This script removes all files related to the FabFilter Plugins\n"
printf " on a Mac, based on the FAQ instructions here:\n"
printf " https://www.fabfilter.com/support/faq/#how-do-i-completely-uninstall-plug-ins-from-my-system\n\n"
printf "\nCOMMANDS:\n"
printf " show | list — print all folders and files related to FabFilter\n"
printf " uninstall | delete | remove — delete all of the matching files\n"
printf " backup — copy all related files to a temp folder\n\n"
printf "\nFLAGS:\n"
printf " -n | --dry-run — instead of running the commands, print them\n"
echo
exit 0
}
while :; do
case $1 in
-n|--dry-run)
shift
export dry_run=1
;;
uninstall|delete|remove)
shift
export prefix="sudo "
echo "Uninstalling FabFilter Files..."
export find_command=' -exec rm -rvf {} \; -print '
;;
backup)
shift
echo "Backing Up FabFilter Files to ${fabfilter_backup_location}..."
mkdir -p ${fabfilter_backup_location}
export find_command=" -exec cp -rvp {} ${fabfilter_backup_location} \\; -print"
;;
show|list)
shift
echo "Showing FabFilter files to be deleted..."
export find_command=' -print '
;;
-h|--help)
shift
;;
*)
break
;;
esac
done
declare -a FF_Dirs=(
"/Library/Audio/Plug-Ins/Components"
"/Library/Audio/Plug-Ins/VST"
"/Library/Audio/Plug-Ins/VST3"
"/Library/Application Support/Avid/Audio/Plug-Ins"
"/Library/Application Support/Digidesign/Plug-Ins"
)
declare -a FF_Prefs=(
"/Users/${USER}/Library/Audio/Presets"
"/Users/${USER}/Library/Application Support"
)
set +e
(( ${dry_run} )) && export prefix="echo ${prefix}"
for dir in "${FF_Dirs[@]}" "${FF_Prefs[@]}"; do
if [[ -d "${dir}" && -n $(find "${dir}" -name "FabFilter*" -depth 1 -type d) ]]; then
command="find \"${dir}\" -name 'FabFilter*' -depth 1 -type d ${find_command}"
eval "${prefix} ${command}" 2>/dev/null
fi
done
dir="/Users/${USER}/Library/Preferences"
command="find \"${dir}\" -name 'com.fabfilter.*' -depth 1 -type f ${find_command}"
eval "${prefix} ${command}" 2>/dev/null
@faeliaso
Copy link
Copy Markdown
Author

cd ~/Downloads
chmod 755 fabfilter-remover.sh

this will show existing FabFilter files

./fabfilter-remover.sh show

this will back them up to /tmp/fabfilter

./fabfilter-remover.sh backup

finally, this will remove them all:

./fabfilter-remover.sh remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment