Skip to content

About

Scripts for cleanup Atlassian Jira (Groovy, Python)

Resources

Stars

47 stars

Watchers

12 watching

Forks

Latest commit

 

History

277 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cleanup-scripts

Scripts for cleanup Atlassian Jira & Confluence (Groovy, Python and SQL). I hope these scripts will help you do a continuous cleanup.

Reference: https://confluence.atlassian.com/adminjiraserver/project-screens-schemes-and-fields-938847220.html

AO table mapping and database notes: kb/AO_mapping_table.md.

Usage

Most of the scripts have a variable isPreview on top. Don't forget to change the boolean value to execute.

branch: master - is for Jira 8.x releases jira-9 - is for Jira 9.x releases jira-7 related to Jira 7.x releases.

Development

Feel free to provide a PR for any situation - improvements, new feature, docs, typo etc. As it's licensed with Apache 2.0 rights, feel modify and reuse how do you want.

Additional

Tool for check if your Jira instance is affected by the bug JRA-47568 and should be used in conjunction with the SSLPoke tool. https://bitbucket.org/atlassianlabs/httpclienttest/src

You can use for groovy runner - Scriptrunner, Mercury for Jira, MyGroovy, Insight, JMWE

macOS laptop cleanup (sh/macos)

All scripts are bash 3.2 compatible (the macOS default), print --help, and can be run on their own or from the interactive launcher:

cd sh/macos
./macos_cleaner.sh          # menu: scan, pick categories, tick items in a checklist, clean
./macos_cleaner.sh --scan   # read-only overview of reclaimable space per category

The launcher has three modes (key m): Clean (pick + confirm + delete), Trash (same, but moved to the Trash, so it can be undone) and Preview (list only). Ctrl-C inside a category returns to the menu.

Category scripts share lib/common.sh and the same options: -n/--dry-run list only, -y/--yes clean the default selection without asking, -t/--trash move to the Trash instead of deleting, --summary machine-readable size (used by the launcher's scan). Without -y they open a checklist (↑/↓, space, a/n/i, Enter) and ask for confirmation.

Script What it does
macos_cleaner.sh Interactive launcher for everything below; also uninstalls apps and shows the cleanup history.
logs_reviewer.sh Logs & crash reports grouped by app/folder. Logs of running processes are truncated, the rest deleted. -d DAYS age filter, -s system dirs only.
cleanup_logs.sh Shortcut for logs_reviewer.sh --system-only; ./cleanup_logs.sh 7 = only logs older than 7 days.
clean_caches.sh App caches (~/Library/Caches, sandboxed app caches, opt-in /Library/Caches). Running apps are not pre-selected. -d DAYS only caches unused for DAYS, -m MB minimum size.
clean_browser_caches.sh Caches of Safari, Chrome, Edge, Brave, Vivaldi, Opera, Yandex, Arc, Firefox. History, cookies, passwords and sessions are never touched. Opt-in: offline site data, Chrome's on-device AI model.
find_uninstalled_apps.sh Leftovers of removed apps: Application Support, Containers, prefs, saved window state, launch agents/daemons whose program is gone. Data folders are opt-in (detection is heuristic).
remove_app_leftovers.sh <App or BundleID> Everything of one app (whole-word match, --fuzzy for substring), incl. /Library launch daemons and helper tools. -u also removes the app itself and its installer receipts.
clean_old_files.sh Forgotten files: used .dmg/.pkg/.xip/.iso installers, unfinished downloads, Install macOS apps, .ipsw firmware, Mail attachment copies; opt-in: old Downloads, iPhone/iPad backups, large old files. -d DAYS, -l MB.
find_duplicates.sh [DIR...] Duplicate files (size → MD5 → byte compare before deleting). One copy is always kept; iCloud placeholders and hard links are skipped.
clean_system_junk.sh Trash, temp files unused for 3+ days, core dumps, QuickLook cache, corrupt preference files; opt-in Time Machine local snapshots.
zsh_macos_cleanup.sh Dev cleanup: brew/gem, DerivedData, simulators, IDE logs, caches > 7 days, Trash, DNS. Opt-in: --deep (Xcode Archives, DeviceSupport, Gradle/npm/pip caches), --rust, --uninstall-android-studio, --reset-password-history. Reports other big folders at the end.
brew_audit.sh Homebrew report: outdated, orphaned deps, unlinked kegs, largest formulae/casks, brew doctor. --fix runs upgrade/autoremove/cleanup interactively.
global_protect_remover.sh Full GlobalProtect VPN removal (vendor uninstaller + leftovers + network state).
yandex_browser_remover.sh Removes Yandex Browser only (other Yandex apps are kept).
zsh_macos_cleanup_account_data.sh Clears accountPolicyData password history for all regular users (slow-login fix).

Safety rules built into lib/common.sh:

  • nothing is deleted without a checklist + confirmation (or an explicit -y, which only takes the pre-selected, safe items);
  • system paths (/System, /usr, /bin, /etc...), $HOME and ~/Library top-level folders, and shallow paths are refused whatever a script computes;
  • sudo is asked once, and only if a picked item needs root; launch agents/daemons are unloaded before their plist is removed;
  • every deleted / trashed path is logged to ~/.local/state/macos-cleaner/history.log (view it from the launcher with h).

Give your terminal Full Disk Access (System Settings → Privacy & Security) so it can read ~/.Trash, app containers and iPhone backups.

About

Scripts for cleanup Atlassian Jira (Groovy, Python)

Resources

Stars

47 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages