Code Monkey home page Code Monkey logo

pkg_uninstaller's Introduction

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

pkg_uninstaller's People

Contributors

mpapis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pkg_uninstaller's Issues

文件多时效率太差

xquartz一万多个文件,要进行一万多次pkgutil --file-info查询,效率太差了,有没有高效方法?
比如
if [ -f _file ] ; then
rm -f _file;
else
pkgutil --file-info {}
...
...
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.