Skip to content

Commit

Permalink
Add cleanup utility to get diskspace back
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Tingelöf committed Oct 18, 2023
1 parent 9d45336 commit c2733b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
{ "template": "utils/tmux-sessionizer", "executable": true, "destination": "~/.local/bin/tmux-sessionizer", "onlyCopy": true },
{ "template": "utils/nightmode", "executable": true, "destination": "~/.local/bin/nightmode", "onlyCopy": true },
{ "template": "utils/hifi_sound", "executable": true, "destination": "~/.local/bin/hifi_sound", "onlyCopy": true },
{ "template": "utils/cleanup", "executable": true, "destination": "~/.local/bin/cleanup", "onlyCopy": true },
{ "template": "wezterm/wezterm.lua", "executable": true },
{ "template": "git/scripts/git-easy-branch", "executable": true },
{ "template": "git/scripts/git-easy-log", "executable": true },
Expand Down
17 changes: 17 additions & 0 deletions templates/utils/cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

find ~/Downloads -type f -size +5M -delete
go clean -modcache
docker image prune -a --filter "until=24h"
docker container prune --filter "until=24h"
docker volume prune --filter "label!=keep"
docker network prune --filter "until=24h"

rm -rf ~/.config/google-chrome/Profile\ 1/Service\ Worker/CacheStorage/*
rm -rf ~/.config/Microsoft/Microsoft Teams/Service Worker/CacheStorage/*


find ~/ -type f -name "defensics-report.zip" -exec rm {}\;
find ~/ -type f -name "defensics_scan_report_wcdbcd_6_x.zip" -exec rm {}\;
find ~/ -type f -name "Defensics\ Scan\ Report\ for\ WCDBCD\ 6.x.zip" -exec rm {}\;

0 comments on commit c2733b3

Please sign in to comment.