killpy 0.17.0__tar.gz → 0.19.0__tar.gz
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.
- {killpy-0.17.0/killpy.egg-info → killpy-0.19.0}/PKG-INFO +201 -101
- killpy-0.17.0/PKG-INFO → killpy-0.19.0/README.md +192 -112
- killpy-0.19.0/killpy/__main__.py +115 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/cli.py +277 -19
- {killpy-0.17.0 → killpy-0.19.0}/killpy/commands/list.py +18 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/models.py +2 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/scanner.py +47 -0
- killpy-0.17.0/README.md → killpy-0.19.0/killpy.egg-info/PKG-INFO +212 -99
- {killpy-0.17.0 → killpy-0.19.0}/pyproject.toml +16 -3
- killpy-0.17.0/killpy/__main__.py +0 -33
- {killpy-0.17.0 → killpy-0.19.0}/killpy/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/cleaner.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/cleaners/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/commands/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/commands/clean.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/commands/delete.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/commands/stats.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/artifacts.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/base.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/cache.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/conda.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/hatch.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/pipenv.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/pipx.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/poetry.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/pyenv.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/tox.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/uv.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/detectors/venv.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy/files/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy.egg-info/SOURCES.txt +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy.egg-info/dependency_links.txt +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy.egg-info/entry_points.txt +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy.egg-info/requires.txt +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/killpy.egg-info/top_level.txt +0 -0
- {killpy-0.17.0 → killpy-0.19.0}/setup.cfg +0 -0
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: killpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: List all .venv directories and Conda environments 🐍 on your system and check how much space they are using. You can then choose which ones to delete in order to free up space 🧹.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Tlaloc-Es/killpy
|
|
6
|
+
Project-URL: Documentation, https://tlaloc-es.github.io/killpy/
|
|
7
|
+
Project-URL: Repository, https://github.com/Tlaloc-Es/killpy
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/Tlaloc-Es/killpy/issues
|
|
5
9
|
Classifier: Environment :: Console
|
|
6
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
7
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
-
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Python: >=3.10
|
|
9
16
|
Description-Content-Type: text/markdown
|
|
10
17
|
Requires-Dist: click>=8.1.8
|
|
11
18
|
Requires-Dist: rich>=13.9.4
|
|
@@ -13,14 +20,20 @@ Requires-Dist: textual>=1.0.0
|
|
|
13
20
|
|
|
14
21
|
<div align="center">
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+

|
|
17
24
|
|
|
18
25
|
### Reclaim disk space by finding and deleting Python environments you no longer use
|
|
19
26
|
|
|
27
|
+
Python environment cleaner for virtualenv, Conda, Poetry, pipx, pyenv, tox, Pipenv, Hatch, uv, caches, and build artifacts.
|
|
28
|
+
|
|
29
|
+
[Documentation](https://tlaloc-es.github.io/killpy/)
|
|
30
|
+
|
|
20
31
|
[](https://pypi.org/project/killpy/)
|
|
32
|
+
[](https://pypi.org/project/killpy/)
|
|
21
33
|
[](https://pepy.tech/project/killpy)
|
|
22
34
|
[](https://github.com/Tlaloc-Es/killpy/stargazers)
|
|
23
35
|
[](https://codecov.io/gh/Tlaloc-Es/killpy)
|
|
36
|
+
[](LICENSE)
|
|
24
37
|
[](<https://twitter.com/intent/tweet?text=%F0%9F%90%8D%20KillPy%20helps%20you%20reclaim%20disk%20space%20by%20detecting%20unused%20Python%20environments%20(.venv,%20poetry%20env,%20conda%20env)%20and%20pipx%20packages.%20Clean,%20organize%20and%20free%20up%20space%20effortlessly!%20%F0%9F%9A%80&url=https://github.com/Tlaloc-Es/KillPy>)
|
|
25
38
|
|
|
26
39
|

|
|
@@ -37,18 +50,26 @@ Every project gets a `.venv`. Every tutorial leaves a Conda environment behind.
|
|
|
37
50
|
|
|
38
51
|
**None of these get cleaned up automatically.**
|
|
39
52
|
|
|
40
|
-
A typical developer machine accumulates **10
|
|
53
|
+
A typical developer machine accumulates **10–40 GB** of Python environments over a few years — most of them abandoned and completely useless.
|
|
54
|
+
|
|
55
|
+
`killpy` scans your filesystem, shows you everything with its size, and lets you delete it — either from a slick interactive terminal UI or via a single headless command.
|
|
56
|
+
|
|
57
|
+
That makes it useful if you are trying to:
|
|
41
58
|
|
|
42
|
-
|
|
59
|
+
- find old Python virtual environments
|
|
60
|
+
- delete unused Conda environments
|
|
61
|
+
- inspect Poetry environment disk usage
|
|
62
|
+
- clean up `pipx` package environments
|
|
63
|
+
- remove Python caches and build artifacts
|
|
64
|
+
- free disk space consumed by Python development tools
|
|
43
65
|
|
|
44
66
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
pipx run killpy --path ~
|
|
68
|
+
# or
|
|
69
|
+
uvx killpy --path ~
|
|
47
70
|
```
|
|
48
71
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## What killpy detects
|
|
72
|
+
### What killpy detects
|
|
52
73
|
|
|
53
74
|
`killpy` supports **11 environment types** across every major Python tool:
|
|
54
75
|
|
|
@@ -70,81 +91,161 @@ ______________________________________________________________________
|
|
|
70
91
|
|
|
71
92
|
## Quickstart
|
|
72
93
|
|
|
73
|
-
**
|
|
94
|
+
**Instant run — no install needed:**
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pipx run killpy
|
|
98
|
+
# or
|
|
99
|
+
uvx killpy
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Install permanently:**
|
|
74
103
|
|
|
75
104
|
```bash
|
|
76
105
|
pip install killpy
|
|
106
|
+
# or
|
|
107
|
+
pipx install killpy
|
|
108
|
+
# or
|
|
109
|
+
uv tool install killpy
|
|
77
110
|
```
|
|
78
111
|
|
|
79
|
-
**
|
|
112
|
+
**Scan current directory:**
|
|
80
113
|
|
|
81
114
|
```bash
|
|
82
115
|
killpy
|
|
83
116
|
```
|
|
84
117
|
|
|
85
|
-
**Scan your entire home folder
|
|
118
|
+
**Scan your entire home folder:**
|
|
86
119
|
|
|
87
120
|
```bash
|
|
88
121
|
killpy --path ~
|
|
89
122
|
```
|
|
90
123
|
|
|
91
|
-
**
|
|
124
|
+
**Exclude paths matching a pattern:**
|
|
92
125
|
|
|
93
126
|
```bash
|
|
94
|
-
|
|
95
|
-
# or
|
|
96
|
-
uvx killpy
|
|
127
|
+
killpy --path ~ --exclude "backups,archive,work"
|
|
97
128
|
```
|
|
98
129
|
|
|
130
|
+
**Delete everything non-interactively (CI / scripts):**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
killpy --path ~/projects --delete-all --yes
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
More documentation: [https://tlaloc-es.github.io/killpy/](https://tlaloc-es.github.io/killpy/)
|
|
137
|
+
|
|
99
138
|
______________________________________________________________________
|
|
100
139
|
|
|
101
140
|
## Interactive TUI
|
|
102
141
|
|
|
103
|
-
Launch the terminal UI to browse and delete environments visually:
|
|
104
|
-
|
|
105
142
|
```bash
|
|
106
143
|
killpy
|
|
107
144
|
killpy --path /path/to/scan
|
|
145
|
+
killpy --path ~ --exclude "company-projects"
|
|
108
146
|
```
|
|
109
147
|
|
|
110
|
-
The TUI starts immediately and streams results as
|
|
148
|
+
The TUI starts immediately and streams results as each detector finishes — no waiting for a full scan before you can start browsing. Select items, mark them, and confirm; **nothing is deleted without explicit action**.
|
|
149
|
+
|
|
150
|
+
Environments flagged with `⚠️` are actively in use by the current Python session — killpy will show them but they should not be deleted.
|
|
111
151
|
|
|
112
152
|
### Keyboard shortcuts
|
|
113
153
|
|
|
114
154
|
| Key | Action |
|
|
115
155
|
|-----|--------|
|
|
156
|
+
| `↑` / `↓` or `k` / `j` | Move cursor up / down (vim-style) |
|
|
157
|
+
| `/` | Open live search/filter bar (regex supported) |
|
|
158
|
+
| `Escape` | Close search bar and clear filter |
|
|
159
|
+
| `T` | Toggle multi-select mode on / off |
|
|
160
|
+
| `Space` | *(Multi-select)* Toggle current row selected |
|
|
161
|
+
| `A` | *(Multi-select)* Select all visible / deselect all |
|
|
162
|
+
| `D` | Mark highlighted item for deletion |
|
|
163
|
+
| `Ctrl+D` | Delete all marked items (or all selected in multi-select mode) |
|
|
164
|
+
| `Shift+Delete` | Delete highlighted item immediately, no mark step |
|
|
165
|
+
| `o` | Open the item's parent folder in the OS file manager |
|
|
166
|
+
| `P` | Remove all `__pycache__` folders under the scanned path |
|
|
167
|
+
| `U` | Uninstall the selected `pipx` package |
|
|
116
168
|
| `Ctrl+Q` | Quit |
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
169
|
+
|
|
170
|
+
### Search / filter
|
|
171
|
+
|
|
172
|
+
Press `/` to open the filter bar at the bottom of the screen. Type any string or a Python regex — the venv table updates live as you type. Press `Escape` or submit an empty value to clear the filter and return to the full list.
|
|
173
|
+
|
|
174
|
+
### Multi-select mode
|
|
175
|
+
|
|
176
|
+
Press `T` to enter multi-select mode. A status bar shows the current selection count.
|
|
177
|
+
|
|
178
|
+
- `Space` — toggle the highlighted row
|
|
179
|
+
- `A` — select all visible non-deleted rows (press again to deselect all)
|
|
180
|
+
- `Ctrl+D` — delete every selected row in one operation
|
|
181
|
+
- `T` again — exit multi-select mode (selection is cleared)
|
|
182
|
+
|
|
183
|
+
Multi-select coexists with the existing `D` / `Ctrl+D` mark-and-delete flow — both work independently.
|
|
122
184
|
|
|
123
185
|
______________________________________________________________________
|
|
124
186
|
|
|
125
187
|
## CLI reference
|
|
126
188
|
|
|
189
|
+
### `killpy` — launch TUI or headless delete
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Usage: killpy [OPTIONS] COMMAND [ARGS]...
|
|
193
|
+
|
|
194
|
+
Options:
|
|
195
|
+
--path DIRECTORY Root directory to scan [default: cwd]
|
|
196
|
+
-E, --exclude TEXT Comma-separated path patterns to skip
|
|
197
|
+
e.g. --exclude "backups,legacy"
|
|
198
|
+
-D, --delete-all Scan and delete ALL found environments without
|
|
199
|
+
launching the TUI
|
|
200
|
+
-y, --yes Skip confirmation prompt (use with --delete-all)
|
|
201
|
+
--help Show this message and exit.
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Examples:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
killpy # TUI, scan cwd
|
|
208
|
+
killpy --path ~ # TUI, scan home
|
|
209
|
+
killpy --path ~/projects --exclude "legacy" # TUI, skip paths with "legacy"
|
|
210
|
+
killpy --path ~/projects --delete-all # headless, with confirmation
|
|
211
|
+
killpy --path ~/projects --delete-all --yes # fully automated, no prompt
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
______________________________________________________________________
|
|
215
|
+
|
|
127
216
|
### `killpy list` — inspect environments
|
|
128
217
|
|
|
129
218
|
```bash
|
|
130
|
-
killpy list
|
|
131
|
-
killpy list --path ~/projects
|
|
132
|
-
killpy list --type venv --type conda
|
|
133
|
-
killpy list --older-than 90
|
|
134
|
-
killpy list --json
|
|
219
|
+
killpy list # list all detected environments
|
|
220
|
+
killpy list --path ~/projects # scan a specific path
|
|
221
|
+
killpy list --type venv --type conda # filter by type (repeatable)
|
|
222
|
+
killpy list --older-than 90 # not accessed in the last 90 days
|
|
223
|
+
killpy list --json # output as a JSON array
|
|
224
|
+
killpy list --json-stream # stream as NDJSON — one line per env
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
`--json-stream` is ideal for piping into `jq` or processing in scripts before the full scan completes:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
killpy list --json-stream --path ~ | jq 'select(.type == "conda") | .size_human'
|
|
135
231
|
```
|
|
136
232
|
|
|
233
|
+
______________________________________________________________________
|
|
234
|
+
|
|
137
235
|
### `killpy delete` — remove environments
|
|
138
236
|
|
|
139
237
|
```bash
|
|
140
|
-
killpy delete
|
|
141
|
-
killpy delete --yes
|
|
142
|
-
killpy delete --dry-run
|
|
143
|
-
killpy delete --type venv
|
|
144
|
-
killpy delete --
|
|
238
|
+
killpy delete # interactive confirmation before delete
|
|
239
|
+
killpy delete --yes # skip confirmation
|
|
240
|
+
killpy delete --dry-run # preview — nothing is deleted
|
|
241
|
+
killpy delete --type venv # only a specific type
|
|
242
|
+
killpy delete --type venv --type cache # multiple types
|
|
243
|
+
killpy delete --older-than 180 --yes # delete stale envs, no prompt
|
|
145
244
|
killpy delete --path ~/projects
|
|
146
245
|
```
|
|
147
246
|
|
|
247
|
+
______________________________________________________________________
|
|
248
|
+
|
|
148
249
|
### `killpy stats` — disk usage summary
|
|
149
250
|
|
|
150
251
|
```bash
|
|
@@ -169,6 +270,8 @@ Example output:
|
|
|
169
270
|
Total: 66 environment(s) — 7.9 GB
|
|
170
271
|
```
|
|
171
272
|
|
|
273
|
+
______________________________________________________________________
|
|
274
|
+
|
|
172
275
|
### `killpy clean` — remove cache directories
|
|
173
276
|
|
|
174
277
|
```bash
|
|
@@ -176,19 +279,19 @@ killpy clean
|
|
|
176
279
|
killpy clean --path ~/projects
|
|
177
280
|
```
|
|
178
281
|
|
|
179
|
-
Removes `__pycache__` directories recursively
|
|
282
|
+
Removes `__pycache__` directories recursively under the target path.
|
|
180
283
|
|
|
181
284
|
______________________________________________________________________
|
|
182
285
|
|
|
183
286
|
## killpy vs alternatives
|
|
184
287
|
|
|
185
|
-
| Tool | venv | conda | poetry | pipx | pyenv | caches | artifacts | TUI |
|
|
186
|
-
|
|
187
|
-
| **killpy** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
188
|
-
| `pyclean` | ❌ | ❌ | ❌ | ❌ | ❌ | `__pycache__` only | ❌ | ❌ |
|
|
189
|
-
| `conda clean` | ❌ | partial | ❌ | ❌ | ❌ | conda only | ❌ | ❌ |
|
|
190
|
-
| `pip cache purge` | ❌ | ❌ | ❌ | ❌ | ❌ | pip only | ❌ | ❌ |
|
|
191
|
-
| `find . -name .venv -exec rm` | venv only | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
288
|
+
| Tool | venv | conda | poetry | pipx | pyenv | caches | artifacts | TUI | search | multi-select |
|
|
289
|
+
|------|:----:|:-----:|:------:|:----:|:-----:|:------:|:---------:|:---:|:------:|:------------:|
|
|
290
|
+
| **killpy** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
291
|
+
| `pyclean` | ❌ | ❌ | ❌ | ❌ | ❌ | `__pycache__` only | ❌ | ❌ | ❌ | ❌ |
|
|
292
|
+
| `conda clean` | ❌ | partial | ❌ | ❌ | ❌ | conda only | ❌ | ❌ | ❌ | ❌ |
|
|
293
|
+
| `pip cache purge` | ❌ | ❌ | ❌ | ❌ | ❌ | pip only | ❌ | ❌ | ❌ | ❌ |
|
|
294
|
+
| `find . -name .venv -exec rm` | venv only | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
192
295
|
|
|
193
296
|
No other single tool discovers, sizes, and removes environments across **all** major Python toolchains.
|
|
194
297
|
|
|
@@ -198,15 +301,45 @@ ______________________________________________________________________
|
|
|
198
301
|
|
|
199
302
|
**My Mac/Linux disk is almost full — can killpy help?**
|
|
200
303
|
|
|
201
|
-
Yes. Run `killpy --path ~` to scan your home folder. The `stats` command gives an immediate breakdown of how many GB each env type is
|
|
304
|
+
Yes. Run `killpy --path ~` to scan your home folder. The `stats` command gives an immediate breakdown of how many GB each env type is consuming. Most developers reclaim 5–30 GB.
|
|
202
305
|
|
|
203
|
-
**How do I delete all unused
|
|
306
|
+
**How do I delete all unused virtual environments at once?**
|
|
204
307
|
|
|
205
308
|
```bash
|
|
206
309
|
killpy delete --type venv --older-than 90 --yes
|
|
207
310
|
```
|
|
208
311
|
|
|
209
|
-
|
|
312
|
+
Deletes every `.venv` / `pyvenv.cfg` env not accessed in the last 90 days, without prompting.
|
|
313
|
+
|
|
314
|
+
**How do I use killpy in a CI pipeline or script?**
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
# List as machine-readable JSON
|
|
318
|
+
killpy list --json
|
|
319
|
+
|
|
320
|
+
# Stream results as NDJSON in real time
|
|
321
|
+
killpy list --json-stream | jq '.size_bytes'
|
|
322
|
+
|
|
323
|
+
# Delete everything without a TUI
|
|
324
|
+
killpy --path ./build_artifacts --delete-all --yes
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**How do I skip certain directories?**
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
killpy --path ~ --exclude "company,production,do-not-touch"
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Any environment whose path contains one of the comma-separated patterns is silently skipped.
|
|
334
|
+
|
|
335
|
+
**How do I clean up Poetry virtualenvs?**
|
|
336
|
+
|
|
337
|
+
Poetry stores virtualenvs in `~/.cache/pypoetry/virtualenvs`. killpy detects and deletes them automatically — no manual path hunting required.
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
killpy list --type poetry
|
|
341
|
+
killpy delete --type poetry --older-than 60
|
|
342
|
+
```
|
|
210
343
|
|
|
211
344
|
**How do I find all `.venv` folders on my computer?**
|
|
212
345
|
|
|
@@ -229,9 +362,13 @@ killpy delete --type conda # delete selected
|
|
|
229
362
|
|
|
230
363
|
`killpy` runs `conda env list` internally and lets you delete individual environments. Alternatively, `killpy --path ~` will surface them in the TUI.
|
|
231
364
|
|
|
232
|
-
**
|
|
365
|
+
**Can I combine filters?**
|
|
233
366
|
|
|
234
|
-
|
|
367
|
+
Yes. For example:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
killpy delete --type venv --older-than 90 --dry-run
|
|
371
|
+
```
|
|
235
372
|
|
|
236
373
|
**How do I remove all `__pycache__` folders recursively?**
|
|
237
374
|
|
|
@@ -239,35 +376,19 @@ Poetry stores virtualenvs in `~/.cache/pypoetry/virtualenvs`. `killpy` detects a
|
|
|
239
376
|
killpy clean --path /path/to/project
|
|
240
377
|
```
|
|
241
378
|
|
|
242
|
-
|
|
379
|
+
Or press `P` in the TUI to clean them for the scanned path.
|
|
243
380
|
|
|
244
|
-
|
|
381
|
+
**What does ⚠️ mean next to an environment?**
|
|
245
382
|
|
|
246
|
-
|
|
247
|
-
Always review selected items before confirming removal.
|
|
248
|
-
You are responsible for files deleted on your system.
|
|
249
|
-
|
|
250
|
-
## Pre-commit hook
|
|
251
|
-
|
|
252
|
-
Use `killpy clean` before each commit to remove cache directories:
|
|
253
|
-
|
|
254
|
-
```yml
|
|
255
|
-
- repo: https://github.com/Tlaloc-Es/KillPy
|
|
256
|
-
rev: 0.15.7
|
|
257
|
-
hooks:
|
|
258
|
-
- id: killpy
|
|
259
|
-
pass_filenames: false
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## FAQ
|
|
383
|
+
The environment is currently in use by the Python session running killpy. It should not be deleted. killpy will still show it so you are aware of it, but treat it with care.
|
|
263
384
|
|
|
264
385
|
**Does it fail if Conda, pipx or pyenv are not installed?**
|
|
265
386
|
|
|
266
|
-
Missing tools are handled gracefully — that detector is simply skipped. You get results for everything that is available.
|
|
387
|
+
No. Missing tools are handled gracefully — that detector is simply skipped. You get results for everything that is available on the system.
|
|
267
388
|
|
|
268
|
-
**Does
|
|
389
|
+
**Does killpy auto-delete anything?**
|
|
269
390
|
|
|
270
|
-
Never. Deletion always requires an explicit action: a key press in the TUI, `--yes` on the CLI, or an interactive prompt.
|
|
391
|
+
Never. Deletion always requires an explicit action: a key press in the TUI, `--yes` on the CLI, or an interactive prompt. killpy is fully read-only on startup.
|
|
271
392
|
|
|
272
393
|
**Can I preview what would be deleted without actually deleting?**
|
|
273
394
|
|
|
@@ -277,21 +398,9 @@ killpy delete --dry-run
|
|
|
277
398
|
|
|
278
399
|
Nothing is removed. You see exactly what would happen.
|
|
279
400
|
|
|
280
|
-
**Can I use it in CI or scripts?**
|
|
281
|
-
|
|
282
|
-
Yes. `killpy list --json` is machine-readable. `killpy delete --yes` skips all prompts.
|
|
283
|
-
|
|
284
|
-
**Can I combine filters?**
|
|
285
|
-
|
|
286
|
-
Yes. For example:
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
killpy delete --type venv --older-than 90 --dry-run
|
|
290
|
-
```
|
|
291
|
-
|
|
292
401
|
**Why is Python using so much disk space?**
|
|
293
402
|
|
|
294
|
-
Each virtual environment is a full copy (or symlinked tree) of a Python interpreter plus all installed packages. A typical project `.venv` with common dependencies
|
|
403
|
+
Each virtual environment is a full copy (or symlinked tree) of a Python interpreter plus all installed packages. A typical project `.venv` with common dependencies weighs 200 MB–1 GB. Multiply by dozens of projects and you get tens of gigabytes — all orphaned when the project is archived.
|
|
295
404
|
|
|
296
405
|
______________________________________________________________________
|
|
297
406
|
|
|
@@ -301,7 +410,7 @@ Keep your repo free of `__pycache__` on every commit:
|
|
|
301
410
|
|
|
302
411
|
```yaml
|
|
303
412
|
- repo: https://github.com/Tlaloc-Es/KillPy
|
|
304
|
-
rev: 0.
|
|
413
|
+
rev: 0.16.0
|
|
305
414
|
hooks:
|
|
306
415
|
- id: killpy
|
|
307
416
|
pass_filenames: false
|
|
@@ -311,10 +420,9 @@ ______________________________________________________________________
|
|
|
311
420
|
|
|
312
421
|
## Safety
|
|
313
422
|
|
|
314
|
-
`killpy` performs **destructive, irreversible** actions.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
You are responsible for files deleted on your system.
|
|
423
|
+
`killpy` performs **destructive, irreversible** actions. Always review the selection before confirming removal. The `--dry-run` flag lets you preview everything safely. Environments marked `⚠️` are actively in use and should not be deleted.
|
|
424
|
+
|
|
425
|
+
**You are responsible for files deleted on your system.**
|
|
318
426
|
|
|
319
427
|
______________________________________________________________________
|
|
320
428
|
|
|
@@ -324,35 +432,27 @@ ______________________________________________________________________
|
|
|
324
432
|
- [ ] `killpy list --sort size|date|name`
|
|
325
433
|
- [ ] `killpy delete --interactive` — checkbox-style selector in the CLI
|
|
326
434
|
- [ ] Shell completions (bash, zsh, fish)
|
|
327
|
-
- [ ] TUI: filter panel, live progress bar, confirmation dialog with total bytes
|
|
328
435
|
- [ ] Config file (`~/.config/killpy/config.toml`) for default scan path and ignored dirs
|
|
329
436
|
- [ ] `killpy export` — save scan results to JSON/CSV for auditing
|
|
330
437
|
- [ ] Windows support improvements (pyenv-win, conda on Windows PATH)
|
|
438
|
+
- [ ] TUI: filter panel, live progress bar, confirmation dialog with total bytes before delete
|
|
331
439
|
- [ ] Detect unused dependencies inside `pyproject.toml` / `requirements.txt`
|
|
332
440
|
|
|
333
441
|
______________________________________________________________________
|
|
334
442
|
|
|
335
443
|
## Contributing
|
|
336
444
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
1. Fork the repository
|
|
340
|
-
1. Create a branch: `git checkout -b my-feature`
|
|
341
|
-
1. Commit your changes: `git commit -m 'Add my feature'`
|
|
342
|
-
1. Run the tests: `uv run pytest`
|
|
343
|
-
1. Push your branch: `git push origin my-feature`
|
|
344
|
-
1. Open a pull request
|
|
345
|
-
|
|
346
|
-
Project behavior and guardrails are documented in [AGENTS.md](AGENTS.md).
|
|
347
|
-
|
|
348
|
-
Useful local checks:
|
|
445
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide — setup, workflow, how to add a new detector, and GIF recording instructions.
|
|
349
446
|
|
|
350
447
|
```bash
|
|
448
|
+
# Quick local checks
|
|
351
449
|
uv run python -m compileall killpy
|
|
352
450
|
uv run pytest
|
|
353
451
|
pre-commit run --all-files
|
|
354
452
|
```
|
|
355
453
|
|
|
454
|
+
Project architecture and guardrails are documented in [AGENTS.md](AGENTS.md).
|
|
455
|
+
|
|
356
456
|
______________________________________________________________________
|
|
357
457
|
|
|
358
458
|
## For AI assistants
|