Using OldMunkiPackages to automate cleaning out old Munki packages from your catalog


In all honesty, I haven’t tried Spruce for Munki, which seems to have a pretty cool feature set. I wanted a simple tool to just clean out everything but the newest version of each package. So if Firefox 44.0.2 is there and Firefox 45.0 is also there, I want Firefox 44.0.2 cleaned out. I also wanted to learn a little more Python. So I wrote up my own little utility called OldMunkiPackages.

All it does is just loop through all the packages, see which ones have the same names, and then keep the newer version and move the older version… somewhere else (by default, the user’s trash folder, but you can specify it to be somewhere else).


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.