Uninstalling Software.

saulv
New Contributor III

I never Index, but now I need to uninstall old 32 bit software.

Can someone guide me through a script? Not Fancy, just down and dirty or a start that I can take over and figure out.

Thanks for considering!

LEGO Education WeDo Software v1.2 installs the files in the following locations. To completely Uninstall LEGO Education WeDo Software v1.2, remove the following directories:

/Applications/WeDo Software
/Users/Shared/LEGO Creations/WeDo
/Users/<user_name>/Documents/LEGO Creations/WeDo
/Users/<user_name>/Library/Application Support/LEGO Company/WeDo
/Library/Application Support/LEGO Creations/WeDo
/Library/Application Support/WeDo
/Library/Receipts/WeDoi386Core.pkg
/Library/Receipts/WeDoi386<Language>.pkg

2 REPLIES 2

mschroder
Valued Contributor

I often use something along these lines:

!/bin/sh

for theDir in /Applications/Adobe Acrobat XI Pro /Library/Application Support/Adobe/Acrobat 11 AMT; do if [ -d "$theDir" ]; then /bin/rm -rf "$theDir" fi
done
cd /var/db/receipts
for thePkg in com.adobe.acrobat.11.viewer.app.pkg.MUI com.adobe.acrobat.11.viewer.preinstall.pkg.MUI com.adobe.acrobat.11.viewer.appsupport.pkg.MUI com.adobe.acrobat.11.viewer.browser.pkg.MUI com.adobe.acrobat.11.viewer.print_automator.pkg.MUI com.adobe.acrobat.11.viewer.print_pdf_services.pkg.MUI ch.cern.pkg.Acrobat_Pro; do echo "checking for Pkg $thePkg" if [ -f ${thePkg}.bom ]; then echo "forgetting Pkg $thePkg" /usr/sbin/pkgutil --forget "$thePkg" > /dev/null 2>&1 fi
done

for theFile in `/bin/ls com.adobe.acrobat.a11.AcrobatQfeUpd11*.bom 2>/dev/null` `/bin/ls com.adobe.acrobat.a11.AcrobatUpd110*.bom 2>/dev/null` `/bin/ls com.adobe.acrobat.a11.AcrobatSecUpd11*.bom 2>/dev/null` `/bin/ls com.adobe.acrobat.viewer.11*.bom 2>/dev/null`; do

echo "File: ${theFile}" thePkg=echo ${theFile}|sed s/.bom// echo "Pkg: ${thePkg}" /usr/sbin/pkgutil --forget "${thePkg}" > /dev/null 2>&1
done
```
You have to pay attention to the spaces in your path. For the language it is propably OK to use a wildcard (asterisk), for the users you probably have to define another loop. You might want to drop the echos, I find them useful to see in the log what has been removed. Error handling would be a nice option...

mschroder
Valued Contributor

Ooops, I should learn how to do proper quoting in my replies ...