{"id":15912716,"url":"https://github.com/chriskrycho/bye","last_synced_at":"2025-03-01T21:51:03.227Z","repository":{"id":41860117,"uuid":"454856511","full_name":"chriskrycho/bye","owner":"chriskrycho","description":"A tiny tool for 'deleting' big directories via $TMPDIR","archived":false,"fork":false,"pushed_at":"2022-02-02T16:54:54.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-10T20:54:08.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chriskrycho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-02T16:45:30.000Z","updated_at":"2022-07-04T16:53:45.000Z","dependencies_parsed_at":"2022-09-15T09:20:46.841Z","dependency_job_id":null,"html_url":"https://github.com/chriskrycho/bye","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskrycho%2Fbye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskrycho%2Fbye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskrycho%2Fbye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriskrycho%2Fbye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chriskrycho","download_url":"https://codeload.github.com/chriskrycho/bye/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241430321,"owners_count":19961635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T16:20:29.400Z","updated_at":"2025-03-01T21:51:03.208Z","avatar_url":"https://github.com/chriskrycho.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `bye` :wave:\n\nA trivial tool to get rid of a folder by moving it to `$TMPDIR` instead of deleting it (which is must faster than doing an `rm -rf`) and then letting the OS clean it up later. Adds a little random noise to the names to avoid collisions.\n\n## Setup\n\n1. Install Rust if you don't already have it.\n\n    ```sh\n    brew install rustup-init\n    rustup-init\n    source $HOME/.cargo/env\n    rustup update stable\n    ```\n\n2. Clone the repo and build it.\n\n    ```sh\n    git clone git@github.com:chriskrycho/bye\n    cd bye\n    cargo build --release\n\n3.  Put it somewhere on your PATH:\n\n    ```sh\n    cp ./target/release/bye \u003csomewhere on your PATH\u003e\n    ```\n\nNow, you can just run `bye node_modules` and it'll get rid of it more or less instantaneously.\n\n## Why/how\n\nThis is mostly useful for dealing with especially large directories with many files (e.g. `node_modules`): `rm -rf` can take a *long* time. This is more or less instantaneous on modern file systems, because it does not perform a copy or a “move”: it just changes where the link on the file system to that directory is.\n\nYou can do the same thing with `mv` yourself, of course:\n\n```sh\nmv node_modules $TMPDIR\n```\n\nFor a while that’s what I was doing. However, if you’re cleaning up folders with the same name over time, you can end up with name collisions—so then you need to add some kind of noise for the names. I got tired of that and wrote this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriskrycho%2Fbye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriskrycho%2Fbye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriskrycho%2Fbye/lists"}