univ-of-utah-marriott-library-apple / cleanup_manager

Licence: MIT license
Cleanup Manager helps you clean up folders on your Mac's hard drive.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cleanup manager

disable sip
This script is used in the recovery partition to automatically disable SIP.
Stars: ✭ 26 (+18.18%)
Mutual labels:  mac, macadmin, macadmins
management tools
A collection of scripts and packages to simplify OS X management.
Stars: ✭ 93 (+322.73%)
Mutual labels:  mac, macadmin, macadmins
LAPSforMac
Local Administrator Password Solution for Mac
Stars: ✭ 29 (+31.82%)
Mutual labels:  mac, macadmin, macadmins
sudoers manager
A standalone Python script to help administrators manage their sudoers file.
Stars: ✭ 28 (+27.27%)
Mutual labels:  mac, macadmin, macadmins
mac scripts
A collection of scripts used to Manage Mac OS X computers.
Stars: ✭ 38 (+72.73%)
Mutual labels:  macadmin, macadmins
blade runner
Blade Runner is a Jamf Pro based Python application that automates and implements a framework to offboard, secure erase and document deprecated Mac systems.
Stars: ✭ 24 (+9.09%)
Mutual labels:  mac, macadmin
pre-commit-macadmin
Pre-commit hooks for Mac admins.
Stars: ✭ 43 (+95.45%)
Mutual labels:  mac, macadmin
GNU-bash-mac-installer
Downloads and builds a Mac package installer for GNU bash 5
Stars: ✭ 17 (-22.73%)
Mutual labels:  mac, macadmin
Macvars
command library for scripting osx
Stars: ✭ 34 (+54.55%)
Mutual labels:  mac, macadmin
Mac Zsh Completions
macOS specific additional completion definitions for Zsh.
Stars: ✭ 79 (+259.09%)
Mutual labels:  mac, macadmin
Display manager
An open-source Python library which can modify your Mac's display settings manually or automatically.
Stars: ✭ 109 (+395.45%)
Mutual labels:  mac, macadmin
jamfscripts
Scripts I use non API related
Stars: ✭ 15 (-31.82%)
Mutual labels:  macadmin, macadmins
Firmware password manager
A Python script to help Macintosh administrators manage the firmware passwords of their computers.
Stars: ✭ 127 (+477.27%)
Mutual labels:  mac, macadmin
Munkiadmin
macOS app for managing Munki repositories
Stars: ✭ 310 (+1309.09%)
Mutual labels:  mac, macadmin
Privacy services manager
A single management utility to administer Location Services, Contacts requests, Accessibility, and iCloud access in Apple's OS X.
Stars: ✭ 115 (+422.73%)
Mutual labels:  mac, macadmin
Mac admin
Helpful scripts & configuration profiles for the Mac admin community
Stars: ✭ 139 (+531.82%)
Mutual labels:  mac, macadmin
Parsepdm
Mac os 查看PDM文件
Stars: ✭ 249 (+1031.82%)
Mutual labels:  mac
jamfpro-extension-attributes
🔍 A repository for EAs to use for reporting in the Jamf Pro Server
Stars: ✭ 30 (+36.36%)
Mutual labels:  macadmin
Swiftyvk
Easy and powerful way to interact with VK API for iOS and macOS
Stars: ✭ 247 (+1022.73%)
Mutual labels:  mac
Ipadownload
Search and download decrypted IPA file from 3rd-party App Store.
Stars: ✭ 247 (+1022.73%)
Mutual labels:  mac

Cleanup Manager

Cleanup Manager helps you clean up folders on your Mac's hard drive.

Contents

Contact

If you have any comments, questions, or other input, either file an issue or send us an email. Thanks!

System Requirements

  • Mac OS X
    • Tested on 10.9 and 10.10
  • Python 2.7.x (which comes preinstalled on OS X, or you can download a non-Apple version here)
  • Management Tools - version 1.8.1 or greater

Download

Download the latest installer for Cleanup Manager here!

Purpose

Cleanup Manager was originally designed to help cleanup user home folders on shared, frequently-used machines. We use it in some student labs that have persistent login information where the users' home folders can accumulate and aren't deleted for long periods of time. Cleanup Manager is also used to manage shared drives that have a tendency to fill up quickly.

Usage

$ cleanup_manager.py [-hvnV] [-l log] [-k date] [-f format] target

Options

Option Purpose
-h, --help Print help message and quit.
-v, --version Print version information and quit.
-n, --no-log Redirect logging to standard output.
-V, --verbose Increase verbosity of output (can be used twice).
--skip-prompt Skips the confirmation prompt. Be careful with this.
-l log, --log-dest log Change the destination log file of log events.
-k date, --keep-after date The date to keep items after. Default is seven days prior to invocation.
-d format, --date-format format Format of the given date. Useful if you have that one particular way of formatting your dates and you don't want to change.
-f size, --freeup size The amount of space to attempt to free up.
-t trigger, --dir-trigger trigger A specific file to set a directory's timestamp from within that directory.
--delete-oldest-first When deleting by size, older items are deleted first. This is the default.
--delete-largest-first When deleting by size, larger items are deleted first.
--overflow Allows the script to delete more than just the size specified to hit target.

target is a path to a directory that you want to clean up.

Examples

To delete up to 15 gigabytes of data within the target directory, while deleting the oldest items first:

$ cleanup_manager.py -f 15g /path/to/target

To attempt to reach 500 megabytes free on the drive with preference given to larger items:

$ cleanup_manager.py -f 500mf --delete-largest-first /path/to/target

To clear up 30% of the drive where target exists by deleting items inside of target (with preference given to older items):

$ cleanup_manager.py -f 30 /path/to/target

Details

After being given a directory to examine, the Cleanup Manager navigates the entire directory tree. Files in the top level are recorded with their last modification timestamp, and folders are navigated to find the most recent item within them. Anything that, from the top level (target), has a most-recent modification timestamp that is older than the --keep-after date will be deleted.

Links are examined to see whether they either:

  1. exist inside of a folder that will be deleted, or
  2. point to something else that will be deleted.

Any link that meets either of these criteria will be unmade.

Update History

This is a short, reverse-chronological summary of the updates to this project.

Date Version Update Description
2016-04-12 1.5.0 Added --dir-trigger option for folder-level trigger files.
2015-07-01 1.4.0 Updated logging to change outputs slightly (for better readability).
2015-05-19 1.3.0 New --overflow flag ensures specified disk space will be cleared.
2015-05-18 1.2.0 Added increased verbosity availability via more -V flags.
2015-03-31 1.1.1 Amended logic to handle combinations of size- and date-based deletions.
2015-03-27 1.1.0 Proper release with size-based deleting of things.
2015-03-27 1.1.0pre4 Script actually handles size-based options properly. Updated in-line docs.
2015-03-27 1.1.0pre3 Implemented logic for deleting inventory items based on size.
2015-03-26 1.1.0pre2 Completed the handling of user instructions for size-based deletion.
2015-03-24 1.1.0pre1 Working to add size-based deletion (instead of just date-based).
2015-02-27 1.0.0 Actual first release. Fairly stable and usable.
2015-02-26 1.0.0a Moved the module directory to a different name than the script.
2015-02-26 1.0.0rc3 Now asks for confirmation prior to deleting things.
2015-02-26 1.0.0rc2 Apparently changing the value of 'name' is a bad idea.
2015-02-26 1.0.0rc1 Uncommented lines that cause deletion. First trials in-action.
2015-02-26 0.9.3 Docstrings added to all methods.
2015-02-26 0.9.2 Added in-script documentation and help feature.
2015-02-26 0.9.1 Updated main method and init.
2015-02-26 0.9.0 Most of the functionality put in place for analysis and deletion.
2014-10-03 0.1 Project started.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].