disk-space-saviour 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +7 -1
- package/package.json +1 -1
- package/src/rules/apps.js +7 -3
- package/src/rules/downloads.js +175 -0
- package/src/rules/other.js +3 -0
- package/src/scanners/global.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fcaba94: Clean application downloads that are fetched again on demand: Chrome bundle
|
|
8
|
+
clones left by exited browsers, superseded Chrome on-device models, Google
|
|
9
|
+
Updater installers, Chrome extension archives, ChatGPT Atlas and Codex app
|
|
10
|
+
caches, Electron and electron-builder archives, the Bun transpiler cache,
|
|
11
|
+
Docker Desktop and Warp staged updates, Zed language servers, tree-sitter
|
|
12
|
+
toolchains, Codex plugin staging, the Clang module cache, VS Code webview
|
|
13
|
+
cache storage and processed Crashpad reports.
|
|
14
|
+
|
|
3
15
|
## 0.18.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -109,7 +109,13 @@ Opera GX, Vivaldi, Arc, Yandex Browser, Naver Whale, 360, QQ Browser, Firefox,
|
|
|
109
109
|
LibreWolf, Waterfox, Zen and Floorp, IDE caches (JetBrains, VS Code, Cursor,
|
|
110
110
|
Windsurf, Qoder), AI agent caches and logs, the Discord cache, macOS app
|
|
111
111
|
updates staged by Sparkle and Squirrel, package manager archives, trash, crash
|
|
112
|
-
reports, core dumps and journald logs.
|
|
112
|
+
reports, core dumps and journald logs. Application downloads are covered too:
|
|
113
|
+
Chrome bundle clones left by exited browsers, superseded Chrome on-device
|
|
114
|
+
models, Google Updater installers, ChatGPT Atlas and Codex app caches,
|
|
115
|
+
Electron and electron-builder archives, the Bun transpiler cache, Docker
|
|
116
|
+
Desktop and Warp staged updates (kept while the app runs), Zed language
|
|
117
|
+
servers, tree-sitter toolchains, Codex plugin staging, the Clang module cache
|
|
118
|
+
and processed Crashpad reports. Telegram pure caches, Safari/WebKit,
|
|
113
119
|
Chromium code/GPU/Dawn/service-worker caches and marker-validated Electron
|
|
114
120
|
caches are included. Telegram databases, browser profiles and Playwright MCP
|
|
115
121
|
profiles are preserved. macOS access failures explain when Full Disk Access
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disk-space-saviour",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Safely reclaims disk space: caches and build outputs of 20+ ecosystems, forgotten projects, and Docker (running, stopped and nested containers), with an emergency mode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/rules/apps.js
CHANGED
|
@@ -167,9 +167,13 @@ export function expandChromiumCaches(rules) {
|
|
|
167
167
|
CACHE_LEAVES.map((leaf) => `${p}/${leaf}`)
|
|
168
168
|
),
|
|
169
169
|
...roots.flatMap((p) =>
|
|
170
|
-
[
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
[
|
|
171
|
+
'GrShaderCache',
|
|
172
|
+
'ShaderCache',
|
|
173
|
+
'GraphiteDawnCache',
|
|
174
|
+
'component_crx_cache',
|
|
175
|
+
'extensions_crx_cache',
|
|
176
|
+
].map((leaf) => `${p}/${leaf}`)
|
|
173
177
|
),
|
|
174
178
|
]),
|
|
175
179
|
],
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { CACHE_LEAVES } from './apps.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Files an application downloads or stages for itself and fetches again on
|
|
5
|
+
* demand: staged updates, language servers, toolchain archives, app bundle
|
|
6
|
+
* clones and caches outside the usual cache folders. Installed applications
|
|
7
|
+
* and the data they read are never matched.
|
|
8
|
+
*/
|
|
9
|
+
const openaiProfiles = [
|
|
10
|
+
'~/Library/Caches/com.openai.atlas/browser-data/host/*',
|
|
11
|
+
'~/Library/Caches/Codex/*',
|
|
12
|
+
];
|
|
13
|
+
const zedRoots = ['~/Library/Application Support/Zed', '~/.local/share/zed'];
|
|
14
|
+
|
|
15
|
+
export const DOWNLOAD_RULES = [
|
|
16
|
+
{
|
|
17
|
+
id: 'chromium-code-sign-clones',
|
|
18
|
+
ecosystem: 'browsers',
|
|
19
|
+
scope: 'tmp',
|
|
20
|
+
description:
|
|
21
|
+
'Chromium app bundle clones left by exited browsers (an update makes them full copies)',
|
|
22
|
+
// Chrome clones its bundle into the per-user `X` directory next to
|
|
23
|
+
// `$TMPDIR` at launch and removes the clone when it exits. A running
|
|
24
|
+
// browser maps the executables of its clone, so the open-file check
|
|
25
|
+
// keeps every clone in use: a browser name would block orphans forever.
|
|
26
|
+
paths: ['{TMP}/../X/*.code_sign_clone/code_sign_clone.*'],
|
|
27
|
+
directoryOnly: true,
|
|
28
|
+
minAge: 'stale',
|
|
29
|
+
busy: [],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'chrome-on-device-models',
|
|
33
|
+
ecosystem: 'browsers',
|
|
34
|
+
description: 'superseded Chrome on-device AI model versions',
|
|
35
|
+
paths: [
|
|
36
|
+
'~/Library/Application Support/Google/Chrome/OptGuideOnDeviceModel/*',
|
|
37
|
+
'~/.config/google-chrome/OptGuideOnDeviceModel/*',
|
|
38
|
+
'{LOCALAPPDATA}/Google/Chrome/User Data/OptGuideOnDeviceModel/*',
|
|
39
|
+
],
|
|
40
|
+
versionPattern: /^(?<version>\d+(?:\.\d+){1,3})$/,
|
|
41
|
+
minAge: 'stale',
|
|
42
|
+
busy: [],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'google-updater-downloads',
|
|
46
|
+
ecosystem: 'system',
|
|
47
|
+
description: 'Google Updater downloaded installers',
|
|
48
|
+
paths: [
|
|
49
|
+
'~/Library/Application Support/Google/GoogleUpdater/crx_cache',
|
|
50
|
+
'{LOCALAPPDATA}/Google/GoogleUpdater/crx_cache',
|
|
51
|
+
],
|
|
52
|
+
minAge: 'stale',
|
|
53
|
+
busy: ['GoogleUpdater'],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'openai-app-caches',
|
|
57
|
+
ecosystem: 'apps',
|
|
58
|
+
description: 'ChatGPT Atlas and Codex app browser caches',
|
|
59
|
+
paths: openaiProfiles.flatMap((profile) =>
|
|
60
|
+
CACHE_LEAVES.map((leaf) => `${profile}/${leaf}`)
|
|
61
|
+
),
|
|
62
|
+
busy: ['ChatGPT Atlas', 'Codex'],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'electron-downloads',
|
|
66
|
+
ecosystem: 'javascript',
|
|
67
|
+
description: 'Electron and electron-builder downloaded archives',
|
|
68
|
+
paths: [
|
|
69
|
+
'~/Library/Caches/electron',
|
|
70
|
+
'~/Library/Caches/electron-builder',
|
|
71
|
+
'~/.cache/electron',
|
|
72
|
+
'~/.cache/electron-builder',
|
|
73
|
+
'{LOCALAPPDATA}/electron/Cache',
|
|
74
|
+
'{LOCALAPPDATA}/electron-builder/Cache',
|
|
75
|
+
],
|
|
76
|
+
minAge: 'stale',
|
|
77
|
+
busy: ['electron-builder', 'electron-forge'],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'bun-transpiler-cache',
|
|
81
|
+
ecosystem: 'javascript',
|
|
82
|
+
description: 'Bun runtime transpiler cache',
|
|
83
|
+
// Bun validates every entry against its source and transpiles again on
|
|
84
|
+
// a miss, so only open files hold the cache back.
|
|
85
|
+
paths: ['~/Library/Caches/bun/@t@', '~/.cache/bun/@t@'],
|
|
86
|
+
busy: [],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'docker-desktop-update-downloads',
|
|
90
|
+
ecosystem: 'apps',
|
|
91
|
+
description: 'Docker Desktop updates downloaded but not installed',
|
|
92
|
+
paths: ['~/Library/Application Support/com.docker.install/in_progress'],
|
|
93
|
+
minAge: 'stale',
|
|
94
|
+
busy: ['Docker Desktop', 'com.docker.backend', 'Docker'],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'docker-desktop-update-images',
|
|
98
|
+
ecosystem: 'apps',
|
|
99
|
+
scope: 'tmp',
|
|
100
|
+
description: 'Docker Desktop update disk images',
|
|
101
|
+
paths: ['{TMP}/DockerDesktopUpdates/*'],
|
|
102
|
+
minAge: 'stale',
|
|
103
|
+
busy: ['Docker Desktop', 'com.docker.backend', 'Docker'],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 'warp-staged-updates',
|
|
107
|
+
ecosystem: 'apps',
|
|
108
|
+
description: 'Warp updates staged for the next restart',
|
|
109
|
+
paths: ['~/Library/Application Support/dev.warp.Warp-*/autoupdate/*'],
|
|
110
|
+
minAge: 'stale',
|
|
111
|
+
// Warp applies the staged bundle when it quits, so it stays while Warp
|
|
112
|
+
// runs. The process names are those of the Stable and Preview builds.
|
|
113
|
+
busy: ['stable', 'preview', 'Warp'],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'zed-downloads',
|
|
117
|
+
ecosystem: 'ide',
|
|
118
|
+
description: 'Zed downloaded Node.js, language servers and Copilot',
|
|
119
|
+
paths: zedRoots.flatMap((root) =>
|
|
120
|
+
['node', 'languages', 'copilot'].map((leaf) => `${root}/${leaf}`)
|
|
121
|
+
),
|
|
122
|
+
busy: ['zed', 'Zed', 'zed-editor'],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'tree-sitter-downloads',
|
|
126
|
+
ecosystem: 'c-cpp',
|
|
127
|
+
description: 'tree-sitter CLI downloaded WASI SDK, Binaryen and parsers',
|
|
128
|
+
paths: ['~/.cache/tree-sitter', '~/Library/Caches/tree-sitter'],
|
|
129
|
+
busy: ['tree-sitter'],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'codex-plugin-staging',
|
|
133
|
+
ecosystem: 'agents',
|
|
134
|
+
description: 'abandoned Codex plugin and marketplace install staging',
|
|
135
|
+
paths: [
|
|
136
|
+
'~/.codex/plugins/..plugin-appserver.staging-*',
|
|
137
|
+
'~/.codex/plugins/.marketplace-plugin-source-staging/*',
|
|
138
|
+
'~/.codex/plugins/.remote-plugin-install-staging/*',
|
|
139
|
+
'~/.codex/.tmp/marketplaces/.staging/*',
|
|
140
|
+
],
|
|
141
|
+
// The Codex daemon runs for days; an install in progress writes to its
|
|
142
|
+
// staging directory, which the activity window and open files catch.
|
|
143
|
+
minAge: 'stale',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'clang-module-cache',
|
|
147
|
+
ecosystem: 'c-cpp',
|
|
148
|
+
description: 'Clang and Swift implicit module cache',
|
|
149
|
+
scope: 'tmp',
|
|
150
|
+
paths: [
|
|
151
|
+
'{TMP}/../C/clang/ModuleCache',
|
|
152
|
+
'{TMP}/../C/org.llvm.clang*/ModuleCache',
|
|
153
|
+
],
|
|
154
|
+
// A build in another directory still reads the cache, which the
|
|
155
|
+
// activity window and open files catch.
|
|
156
|
+
minAge: 'stale',
|
|
157
|
+
busy: ['clang', 'clang++', 'swift-frontend', 'swiftc', 'xcodebuild'],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'crashpad-reports',
|
|
161
|
+
ecosystem: 'system',
|
|
162
|
+
description: 'Chromium and Electron app crash reports already processed',
|
|
163
|
+
tier: 'moderate',
|
|
164
|
+
aggregate: true,
|
|
165
|
+
paths: [
|
|
166
|
+
'~/Library/Application Support/*/Crashpad/completed/*',
|
|
167
|
+
...['Google', 'Yandex', 'BraveSoftware'].map(
|
|
168
|
+
(vendor) =>
|
|
169
|
+
`~/Library/Application Support/${vendor}/*/Crashpad/completed/*`
|
|
170
|
+
),
|
|
171
|
+
'~/.config/*/Crashpad/completed/*',
|
|
172
|
+
],
|
|
173
|
+
minAge: 'stale',
|
|
174
|
+
},
|
|
175
|
+
];
|
package/src/rules/other.js
CHANGED
|
@@ -107,6 +107,9 @@ export const OTHER_RULES = [
|
|
|
107
107
|
'~/Library/Application Support/Code/Cache',
|
|
108
108
|
'~/Library/Application Support/Code/CachedData',
|
|
109
109
|
'~/Library/Application Support/Code/CachedExtensionVSIXs',
|
|
110
|
+
'~/Library/Application Support/Code/WebStorage/*/CacheStorage',
|
|
111
|
+
'~/.config/Code/WebStorage/*/CacheStorage',
|
|
112
|
+
'{APPDATA}/Code/WebStorage/*/CacheStorage',
|
|
110
113
|
'~/.vscode-server/data/CachedExtensionVSIXs',
|
|
111
114
|
'~/.vscode-server/data/logs',
|
|
112
115
|
'~/.cursor-server/data/CachedExtensionVSIXs',
|
package/src/scanners/global.js
CHANGED
|
@@ -2,7 +2,8 @@ import { scanItems } from '../env/scope.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Global per-user caches (ecosystem download and compilation caches, IDE and
|
|
4
4
|
* browser caches), system package caches, and leftovers in temporary
|
|
5
|
-
* directories. See ../rules/ecosystems.js
|
|
5
|
+
* directories. See ../rules/ecosystems.js, ../rules/other.js and
|
|
6
|
+
* ../rules/downloads.js.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
import { CACHE_RULES } from '../rules/ecosystems.js';
|
|
@@ -14,6 +15,7 @@ import { expandGlobPaths, expandRulePath, isWithin } from '../paths.js';
|
|
|
14
15
|
import { olderThan, scanTimeBusy, resolvePaths } from './common.js';
|
|
15
16
|
import { configuredPattern } from '../env/cache-roots.js';
|
|
16
17
|
import { TOOLCHAIN_CACHE_RULES } from '../rules/toolchains.js';
|
|
18
|
+
import { DOWNLOAD_RULES } from '../rules/downloads.js';
|
|
17
19
|
import { timed } from '../timings.js';
|
|
18
20
|
|
|
19
21
|
export const GLOBAL_RULES = [
|
|
@@ -21,6 +23,7 @@ export const GLOBAL_RULES = [
|
|
|
21
23
|
...expandChromiumCaches(OTHER_RULES),
|
|
22
24
|
...APP_RULES,
|
|
23
25
|
...TOOLCHAIN_CACHE_RULES,
|
|
26
|
+
...DOWNLOAD_RULES,
|
|
24
27
|
];
|
|
25
28
|
|
|
26
29
|
function scopeBases(rule, homes, tmpDirs) {
|