voidcosmos / voidcosmos/npkill

delete by --older-than flag

Open
#257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
9.4k
Forks
254
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
User should be able to delete node_modules that have not been accessed for over X days. The reason for this I usually have old projects/experiments I abandon and they're just taking up space for no reason.

Describe the solution you'd like
Add a --older-than {X days} flag. I was inspired by (killpy)[https://github.com/Tlaloc-Es/killpy]

Describe alternatives you've considered
I'll run a script to filter folders that have not been accessed for X days, then I'll call npkill on each one.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI entry point and trace how node_modules directories are filtered and deleted. Run the existing test suite or CLI checks before and after the change. Done means --older-than accepts a day value and deletes only node_modules not accessed within that period.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.