• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Packages - how to make an uninstaller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packages - how to make an uninstaller?


  • Subject: Re: Packages - how to make an uninstaller?
  • From: Mike Solin <email@hidden>
  • Date: Tue, 28 Mar 2017 17:30:52 -0400

It’s built-in to the shell.  See 'man bash'.

Mike

--

email@hidden / @flammable
http://mikesolin.com

On Tue, Mar 28, 2017 at 2:28 PM, Stephen Kay <email@hidden> wrote:
Thanks for the example! Excuse my ignorance, but what does '-d' command
do? I've been trying to search for info on this, related to
shell-scripting, but couldn't find anything.

Thanks,
- Stephen

On 3/27/17 12:35 PM, "Oakman"
<installer-dev-bounces+sk=karmemail@hidden on behalf of
email@hidden> wrote:

>On Mar 26, 2017, at 3:14PM, Stephen Kay wrote:
>
>> What I really need to see is an example script for removing installed
>> files.
>
>
>This is how I did it using a postinstall script. I am only an amateur, so
>take it for what its worth.
>----------
>#!/bin/sh
>#
>####################################################
>###  Remove our application, Foo, if present.    ###
>####################################################
>
>## Is Foo installed? ##
>if [[ -d "$3/Applications/Foo.app" ]] ; then
>
>## Remove the application ##
>       rm -rf "$3/Applications/Foo.app"
>
>sleep 1
>## Is the optional FooSelection service installed? ##
>if [[ -d "$3/Library/Services/FooSelection.service" ]] ; then
>
>## Remove Foo service if it exists ##
>       rm -rf "$3/Library/Services/FooSelection.service"
>fi
>
>## Remove the files Mac OS X created when ##
>## Foo was run per Boss's instructions    ##
>
>       /usr/bin/su $USER -c "/bin/rm -R ~/Library/Saved\ Application\
>State/Foo\ *.foo.prefs.savedState"
>       /usr/bin/su $USER -c "/bin/rm -R ~/Library/Preferences/Foo\
>*.foo.prefs.plist"
>
>## Remove record of Foo having been installed ##
>       /usr/sbin/pkgutil --forget "com.foo.pkg"
>       /usr/sbin/pkgutil --forget "com.foo.service.pkg"
>fi
>
>exit 0
>----------
>
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Installer-dev mailing list      (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Packages - how to make an uninstaller?
      • From: Stephane Sudre <email@hidden>
References: 
 >Packages - installing to current user's home directory (From: Hanspeter Harpf <email@hidden>)
 >Re: Packages - installing to current user's home directory (From: Stephane Sudre <email@hidden>)
 >Re: Packages - installing to current user's home directory (From: Hanspeter Harpf <email@hidden>)
 >Packages - how to make an uninstaller? (From: Stephen Kay <email@hidden>)
 >Re: Packages - how to make an uninstaller? (From: Conor Schutzman <email@hidden>)
 >Re: Packages - how to make an uninstaller? (From: Stephen Kay <email@hidden>)
 >Re: Packages - how to make an uninstaller? (From: Oakman <email@hidden>)
 >Re: Packages - how to make an uninstaller? (From: Stephen Kay <email@hidden>)

  • Prev by Date: Re: Packages - how to make an uninstaller?
  • Next by Date: Re: Packages - how to make an uninstaller?
  • Previous by thread: Re: Packages - how to make an uninstaller?
  • Next by thread: Re: Packages - how to make an uninstaller?
  • Index(es):
    • Date
    • Thread