Commit 3ba9257
committed
Enhance disk cleanup script with discovery and additional cleanup
Added comprehensive analysis and additional cleanup targets:
Discovery Features (for future optimization):
- List top 20 largest installed packages with sizes
- Scan /usr for large directories (>500MB)
- Scan /opt for large directories
- Scan /usr/local for large directories
- This helps identify new cleanup opportunities over time
Additional Package Removals:
- MySQL packages (^mysql-.*)
- MongoDB packages (^mongodb-.*)
- PostgreSQL packages (^postgresql-.*)
- snapd
- azure-cli (was missing from package list)
Additional Directory Removals:
- /usr/share/swift (Swift toolchain)
- /usr/local/julia* (Julia language)
- /usr/share/kotlinc (Kotlin compiler)
- /usr/local/aws-cli (AWS CLI)
- /root/.rustup (Rust toolchain)
- /root/.cargo (Rust packages)
- /imagegeneration (Azure image generation tools)
- /var/lib/docker/tmp/* (Docker temp files)
- /var/cache/apt/archives/* (APT package cache)
- /var/lib/apt/lists/* (APT list cache)
- /var/lib/snapd/cache/* (Snap cache)
Docker Cleanup Enhancement:
- Added --volumes flag to prune volumes too
- Remove Docker temp directory
Expected Additional Space Freed:
- Previous: ~30GB
- Now: ~35-40GB (additional 5-10GB from new targets)
The discovery output will help identify if GitHub adds new large
packages/tools to their runners that we should add to cleanup.1 parent bcfe8a1 commit 3ba9257
1 file changed
Lines changed: 64 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
19 | 48 | | |
20 | 49 | | |
21 | 50 | | |
22 | 51 | | |
23 | 52 | | |
24 | | - | |
| 53 | + | |
25 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
26 | 59 | | |
27 | 60 | | |
28 | 61 | | |
| 62 | + | |
29 | 63 | | |
30 | 64 | | |
31 | 65 | | |
| |||
37 | 71 | | |
38 | 72 | | |
39 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
40 | 91 | | |
41 | | - | |
42 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
43 | 100 | | |
| 101 | + | |
44 | 102 | | |
45 | 103 | | |
46 | 104 | | |
47 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
0 commit comments