port (pkg|dmg)

David Osguthorpe david.osguthorpe at gmail.com
Sun Oct 24 09:23:50 PDT 2010


On Sun, Oct 24, 2010 at 02:33:53PM +0200, Marko Käning wrote:
> Yep, I see. The situation is the same everywhere when it comes to uninstalls. ;)
>
> Windows, Linux, MacOSX, ...

huh - uninstall works fine for both rpm (as mentioned previously on this list)
and deb (ubuntu) - dpkg remove/purge - I use it all the time

> I saw in my /Library/Reiceips/ lots of pkg files from NeoOffice which I installed a while ago. Update by update is there.
> I wonder what can be done about them… Can I throw out these files to uninstall the old updates and leave only the latest one. Or would they be needed in the future as well. Guess this is rather a question to the NeoOffice guys...

the .pkg directories in /Library/Receipts are essentially the installer .pkg with the
the bulky pax archive (Archive.pax) removed
running lsbom on the Archive.bom in the Contents directory of a Receipt lists the
base files the package installed (some config files may be generated by installer scripts
- these appear to be neither listed in the .bom or defined anywhere else)

so you write a perl script to run lsbom on the archive, read the file output lines and
delete those files - yes been there done that
(there is also an uninstalllang.pl perl script out there on the net to remove unused
languages from your install - Apple allows you to limit the languages you install
when doing a base install but all updates then re-add the full language packages)

Im now converting this script to python because from Leopard on only old style .pkg
installs leave the .pkg receipt directory - new style installs dump the installed
files into an sqlite3 database /Library/Receipts/db/a.receiptdb and the .bom under
/Library/Receipts/boms - I find it easier to read sqlite databases in python

note this is just for .pkg installs - stupid installers like VISE leave no information
about what was installed

David



More information about the macports-dev mailing list