UninstallPKG
Your rating: Now say why...

(5) 4.7

Remove packages (.PKG) and all their contents.   Shareware ($9.99)
Add to my Watch List
Email me when discounted
UninstallPKG allows you to completely remove so called "packages" (file extension .pkg) and all their installed contents from your Mac. It can be used to reclaim precious disk space by removing unwanted functionality like unused printer drivers, or to completely remove applications you no longer use. UninstallPKG can also keep your Mac clean by removing left-over files from applications that you have already partially removed manually. It can remove all 37290 files of Office 2011 at once, or completely remove things like Java or the Flash plugin. It is also able to clean-up after
What's New
Version 1.0.5:
  • Allow uninstallation of old packages from pre-OS X 10.6 (/Library/Receipts)
  • Allow uninstallation of local user packages (~/Library/Receipts)
  • Fixed uninstallation of packages containing locked files (e.g., CrashPlan)
  • Fixed problem where settings for removal of additional files would be ignored
  • Added more details to the log-files about additional removed files
  • Added package BOM size to package 'Content Size'
Version 1.0.5:
  • Allow uninstallation of old packages from pre-OS X 10.6 (/Library/Receipts)
  • Allow uninstallation of local user packages (~/Library/Receipts)
  • Fixed uninstallation of packages containing locked files (e.g., CrashPlan)
  • Fixed problem where settings for removal of additional files would be ignored
  • Added more details to the log-files about more...
Requirements
  • Intel, 64-bit processor
  • OS X 10.8 or later



MacUpdate - UninstallPKG







  • Pacifist
    +2

  • unpkg
    +2

  • AppCleaner
    +2
UninstallPKG User Discussion (Write a Review)
ver. 1.x:
(5)
Your rating: Now say why...
Overall:
(5)

sort: smiles | time
burypromote

-1

LeonBe;mont2070 reviewed on 18 Feb 2014
Here is my solution for uninstalling PKGs implemented in Python.
#!/usr/bin/env python2.7

import subprocess as subp
#import shutil
import sys, os
#import pdb

class Delpkg(object):
pkgInfoCommand = 'pkgutil --pkg-info "{pkgname}"'
pkgFilesCommand = 'pkgutil --files "{pkgname}" --only-files'
pkgDirsCommand = 'pkgutil --files "{pkgname}" --only-dirs'
def __init__(self,pkglist=[]):
self.pkgsInfo = {}
for i in pkglist:
pkgInfo = self.getPkgInfo(i)
if pkgInfo is not None:
self.pkgsInfo[i] = pkgInfo
def __call__(self):
if os.getuid() != 0:
for i in self.listFiles():
print i
for i in self.listDirs():
print i
else:
for i in self.listFiles():
try:
os.remove(i)
except OSError:
sys.stderr.write('Failed to remove "{0}"n'.format(i))
for i in self.listDirs():
try:
os.rmdir(i)
except OSError:
sys.stderr.write('Failed to remove "{0}"n'.format(i))
for i in self.pkgsInfo:
subp.call('pkgutil --forget "{0}"'.format(i),shell=True)

def getPkgInfo(self,pkgname):
runPkgInfoComm = subp.Popen(self.pkgInfoCommand.format(pkgname=pkgname),
shell=True,stdout=subp.PIPE)
out = runPkgInfoComm.communicate()[0]
if runPkgInfoComm.returncode == 0:
pkgInfo = dict(i.split(': ') for i in out.rstrip().split('n'))
pkgInfo['prefixpath'] = os.path.join(pkgInfo['volume'],pkgInfo['location'])
return pkgInfo
else:
return None

def generalListComm(self,command):
for i in self.pkgsInfo:
runComm = subp.Popen(command.format(pkgname=i),
shell=True, stdout = subp.PIPE)
out = runComm.communicate()[0].rstrip().split('n')
for j in out:
yield os.path.join(self.pkgsInfo[i]['prefixpath'],j)
def listDirs(self):
dirs = [ i for i in self.generalListComm(self.pkgDirsCommand) ]
dirs.sort(reverse=True)
for i in dirs:
yield i
def listFiles(self):
for i in self.generalListComm(self.pkgFilesCommand):
yield i

if __name__=='__main__':
delpkg = Delpkg(sys.argv[1:])
#pdb.set_trace()
delpkg()
[Version 1.0.2]

1 Reply

burypromote

+36
Corecode replied on 07 Apr 2014
Nice script. upsides of UninstallPLG compared to the script: it takes extra care not to remove files needed by other packages and therefore is more save than other solutions and does other things like removing generated and left-over files not directly listed in the package. Also it now supports old style (pre 10.6 packages).
burypromote

+10
Ken420 commented on 16 Feb 2014
UninstallPKG 1.0.1 has no application icon.
[Version 1.0.1]

1 Reply

burypromote

+10
Ken420 replied on 20 Feb 2014
My mistake. There was something wrong with my machine that prevented the application icon from appearing properly.
burypromote

+1

Urick-Hunt reviewed on 16 Oct 2013
Awesome job! Very improved overall since the initial release. Thank you again for such a useful app.
[Version 1.0b5]


burypromote

+1
leamancrews commented on 03 Sep 2013
Can someone explain the utility of this app? I don't understand the need or desire to remove .pkg files.

#1) The way I understand it, .pkg files are either installers, or receipts left by installers. The receipts are used by Software Update, et al, to determine what software you have installed (and what version) to help determine what updates you need. So is this app meant to remove installers you have laying around, or remove the .pkg receipts? If it's the latter, shouldn't you keep these files?

#2) What I would like is an application that read .pkg receipts to perform a complete uninstall of an application installed via a .pkg and Installer.app. Does this app do that? It doesn't seem to, but that's something that OS X could really use. (I don't know why it's not a function of Installer.app already.)

Thanks in advance.
[Version 1.0b4]

3 Replies

burypromote
+1
CoreCode (developer) replied on 04 Sep 2013
>What I would like is an application that read .pkg receipts to perform a complete uninstall of
>an application installed via a .pkg and Installer.app. Does this app do that?

of course it does do just that, anything else would be useless ;)

any ideas how to improve the description to better indicate it does just that would be welcome - although i'm not sure how the description could be confusing.
burypromote
+2

+128
Mcr replied on 15 Oct 2013
@CoreCode
With all due respect, your reply to leamancrews I don't think really cleared it up. Your description of the product is worded for 'Techies'. For lay people, and especially people familiar with Windows, the concept of an installer and the application installed by the installer is quite distinct, and typically when you delete the installer on Windows (which to laypeople I think that is what they see a package as, an installer), it does not delete the application installed by the installer.

Your app removes the package plus the application installed by the package (as I understand your reply)...I can easily see how to some people that is not clear, that they think it only just deletes the package files (i.e. the 'installer'). And certainly most laypeople don't understand what a package or receipt is, or its relationship to what they 'see' is the application.

Also on your website, you correctly and rightfully state that caution should be exercised when removing a package as it can have unexpected consequences. I think it might be good idea to have a similar warning here at the MacUpdate site, since it is possible to download your app directly from MAcUPdate and never visit your website, and there is no ReadMe in the zip file. A readme in the zip file would be useful, again advising caution, and frankly, stating that if you don't know what you are doing, you should think twice about using this app (worded politely of course, but in so many words).

Leamancrews, I suspect, is thinking along the lines of something like AppDelete or AppCleaner. It definitely is not clear to me, and I'm a technical person, that your app, even if it removes the application .app file, also clears out things like Preference plist files, Application Support folders. launch daemons, etc and all those other bits and pieces. If it does, great, say so in the description.

Again, I am not criticizing you or your application, I'm sure it is a fine app. Just saying that try to view how your description would be interpreted by someone less technical, especially someone coming from the Windows world, where the install program and the program it installs are very separate and distinct, where deleting the installer (e.g. remove the 'package') doesn't remove the application it was used to install.

In the description at the top of this MacUpdate page, it says "Remove PKG files", it does not say, "Remove PKG files AND the application installed by the PKG".

You asked for suggestions how to make the description more clear. As someone who's been making his living in technology and IT for over 30 years, I suggest the following (and not implying you haven't or don't do these things; I don't know):

1) Don't ask your tech friends or fellow developers to review your documentation, you are all techies and tend to view things through tech colored glasses, making sure everything is 'technically' correct. but not reviewing with an end user in mind. Ask a non developer or lay person to read your docs and ask them "After reading this, tell me what you think this software does or is intended for?" Look at the product description for AppDelete...my wife, who is very intelligent, but not a computer person, understands immediately what AppDelete does.

After 30 years, it still surprises me how many developers view end users or non technical people with a patronizing attitude.

2) Understand your intended audience, if your audience is techies and developers, then maybe it's okay your documentation reflect that, and then say so. If your audience may be lay people, then my #1 comment is definitely one to heed. Or at least in your docs, allow for the possibility that a layperson my look at this, and if nothing else say, hey if you don't understand what I mean by a package and what could happen when you remove it, you probably shouldn't use this. Go get AppDelete.

3) As a developer, who sells software commercially for money, treat the public respectfully. Every person you respond to is potentially a customer or already a customer, or someone who may recommend your product to another potential customer. It takes a lot to win a customer, it takes very little to lose one or turn them away.

I'm pretty sure you meant no ill will with your comment "of course it does do just that, anything else would be useless ;)", and yes, you had the little 'wink wink' emoticon at the end, but I can tell you from experience, there are people who after seeing that reply would not give you a second thought, even if the product or service you provide is exactly what they are looking for.

Thanks and good luck to you in your endeavors.
burypromote
CoreCode (developer) replied on 22 Oct 2013
> Your description of the product is worded for 'Techies'

we believe that currently this is a "good idea". removing packages can be a dangerous thing if you don't know what you are doing and accidentally remove packages of things you still want to use. also, the app is still in beta-testing so it really should only be *tested* by techies.


> I can easily see how to some people that is not clear,
> that they think it only just deletes the package files (i.e. the 'installer').

we believed that the "and all their contents" in the description made it clear that not only the package-receipts but also the contents installed by the application are removed, but it seems like further improved wording is necessary.


> I think it might be good idea to have a similar warning here at the MacUpdate site,
> since it is possible to download your app directly from

there are many in-app warnings before proceeding to un-install a package.


> A readme in the zip file would be useful, again advising caution, and frankly,
> stating that if you don't know what you are doing, you should think twice about using this app

there is a readme in the download but its embedded into the app package and availabe in-app by clicking the help button or from the help menu.
creating an alias to the readme is a good suggestion, thanks ;)


> It definitely is not clear to me, and I'm a technical person, that your app, even if it removes the application .app file,
> also clears out things like Preference plist files, Application Support folders.
> launch daemons, etc and all those other bits and pieces.

it currently does only delete what is specified in the package, i.e. what gets installed. preferences and other files created by the application after installaton are not currently removed but thats on the ToDo list. thanks, we'll make sure to update the description to mention these features once they get implemented.


> In the description at the top of this MacUpdate page, it says "Remove PKG files",
> it does not say, "Remove PKG files AND the application installed by the PKG".

thanks we've submitted an request to update the title. however we are prefering to talk about the "installed contents" of the package, because many/most packages are not corresponding to normal applications but to other things (browser plugins, x11, command-line tools, libraries, frameworks, drivers, etc etc). just talking about applications would be wrong.


> As someone who's been making his living in technology and IT for over 30 years, I suggest the following

thanks for your feedback!
burypromote
+2

+41
Aargl commented on 29 Jul 2013
So sad there's no 10.6 version... :-(
[Version 1.0b3]


burypromote

+1

Urick-Hunt reviewed on 23 Jun 2013
A much needed utility on OS X.
Thank you )
A built in option to launch as root might help for some users...
[Version 1.0b2]

8 Replies

burypromote
CoreCode (developer) replied on 24 Jun 2013
>A much needed utility on OS X.

thanks ;)


>A built in option to launch as root might help for some users...

can you elaborate? UninstallPKG seems to work fine just as well with "standard" user accounts as it does with "admin" accounts.
burypromote

+1
Urick-Hunt replied on 24 Jun 2013
In order to remove a few packages I needed to use LaunchAsRoot https://www.macupdate.com/app/mac/38617/launchasroot
But yes for most packages the default was sufficient.
Again very nice work indeed )
burypromote
CoreCode (developer) replied on 24 Jun 2013
thanks again ;)

if you tell me which packages aren't uninstall-able without LaunchAsRoot, i'll have a look
burypromote

+1
Urick-Hunt replied on 24 Jun 2013
FreePascal required LaunchAsRoot to remove
http://www.freepascal.org/
As well as Clover EFI bootloader however this wouldn't be an issue for most Mac users for obvious reasons )
http://cloverefiboot.sourceforge.net/
burypromote
CoreCode (developer) replied on 24 Jun 2013
thanks, its on the todo list for the next release
burypromote

+62
Dokter_mac replied on 29 Jul 2013
Aren't those the files that disk utility needs when you have to repair permissions? If so, be carefully and only remove the pkg files from apps that you have removed.

Sincerely.
burypromote
+1
CoreCode (developer) replied on 29 Jul 2013
>Aren't those the files that disk utility needs when you have to repair permissions?

UninstallPKG doesn't allow you to remove system packages by default.


>If so, be carefully and only remove the pkg files from apps that you have removed.

1.) the whole point is to remove apps you no longer want/use and not something you still need ;)
2.) removing the app manually is unnecessary since UninstallPKG will remove all files from the package anyway.
burypromote
CoreCode (developer) replied on 02 Sep 2013
uninstallation of CloverEFI / FreePascal and all other previously problematic packages should now work in beta4.
burypromote
+1

+3

HansMueller4641 reviewed on 21 Jun 2013
finally a WORKING pkg remover ... seems to work fine although its supposedly beta quality
[Version 1.0b1]


There are currently no troubleshooting comments. If you are experiencing a problem with this app, please post a comment.


marcfrederick rated on 29 Oct 2013

[Version 1.0b5]


Downloads:5,556
Version Downloads:366
Type:Utilities : System
License:Shareware
Date:07 Apr 2014
Platform:Intel 64 / OS X
Price: $9.99
Overall (Version 1.x):
Features:
Ease of Use:
Value:
Stability:
Displaying 1-7 of 7
Displaying 1-1 of 1
-
-
-
Please login or create a new
MacUpdate Member account
to use this feature
Watch Lists are available to
MacUpdate Desktop Members
Upgrade Now
Install with MacUpdate Desktop.
Save time moving files & cleaning
up space wasting archives.
UninstallPKG allows you to completely remove so called "packages" (file extension .pkg) and all their installed contents from your Mac. It can be used to reclaim precious disk space by removing unwanted functionality like unused printer drivers, or to completely remove applications you no longer use. UninstallPKG can also keep your Mac clean by removing left-over files from applications that you have already partially removed manually. It can remove all 37290 files of Office 2011 at once, or completely remove things like Java or the Flash plugin. It is also able to clean-up after uninstalling an application by removing it from the Dock and from the LoginItems directory, and erasing the files those packages generated (preferences, etc.).


- -