OSX Packages Uninstaller
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE initial release Dec 18, 2011
README.md
VERSION v0.1.1 Dec 18, 2011
pkg-install reverse PATH check Dec 18, 2011
pkg-list initial release Dec 18, 2011
pkg-uninstall initial release Dec 18, 2011
pkg-wrapper initial release Dec 18, 2011

README.md

OSX Packages Uninstaller

This software is aimed to help manage packages uninstalling in OSX.

Installation

Installation is as simple as:

[sudo] bash < <(curl -sL https://raw.github.com/mpapis/pkg_uninstaller/master/pkg-install)

Adding to PATH, for system installation (with sudo):

echo 'PATH=$PATH:/opt/pkg_uninstaller' >> /etc/profile

Adding PATH when installed as user (without sudo):

echo 'PATH=$PATH:$HOME/.pkg_uninstaller' >> $HOME/.bash_profile

Note the single quotes are important in both cases.

Installing package file

Install packages with:

pkg-install <package_file.pkg>

This will create uninstall_<package_file_pkg>.sh in current directory.

To uninstall this package just execute ./uninstall_<package_file_pkg>.sh.

Example

# coming soon

Uninstalling single packages by name.

List available package names (possibly filtering by [name]):

pkg-list [name]

Uninstall package:

pkg-uninstall <name>

Using internally in package to build uninstaller

  • You have to bundle pkg-wrapper with your application and install it to disk before executing the hook bellow.

  • In before installing hook call this script:

#!/bin/bash

pkg-wrapper before "your package name"
  • In after installing hook call this script:
#!/bin/bash

pkg-wrapper before "your package name" /path/to/uninstaller_name.sh
  • In uninstall hook call:
#!/bin/bash

/path/to/uninstaller_name.sh
rm /path/to/uninstaller_name.sh