{"id":17228657,"url":"https://github.com/njonsson/euthanize","last_synced_at":"2026-05-18T15:31:32.498Z","repository":{"id":30357601,"uuid":"33910075","full_name":"njonsson/euthanize","owner":"njonsson","description":"Implements LRU sweeping for filesystem-based caching systems, or for housekeeping your throwaway files","archived":false,"fork":false,"pushed_at":"2015-10-28T13:51:05.000Z","size":340,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T18:52:14.025Z","etag":null,"topics":["bash","command-line-app","filesystem","lru","shell"],"latest_commit_sha":null,"homepage":"https://github.com/njonsson/euthanize","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/njonsson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-14T04:07:29.000Z","updated_at":"2023-11-20T08:09:51.000Z","dependencies_parsed_at":"2022-07-31T09:48:07.361Z","dependency_job_id":null,"html_url":"https://github.com/njonsson/euthanize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/njonsson/euthanize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njonsson%2Feuthanize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njonsson%2Feuthanize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njonsson%2Feuthanize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njonsson%2Feuthanize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/njonsson","download_url":"https://codeload.github.com/njonsson/euthanize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njonsson%2Feuthanize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268162391,"owners_count":24205702,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","command-line-app","filesystem","lru","shell"],"created_at":"2024-10-15T04:44:42.672Z","updated_at":"2026-05-18T15:31:27.466Z","avatar_url":"https://github.com/njonsson.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# _euthanize_\n\nSome memory caching systems, such as [_memcached_][memcached], employ a\nLeast-Recently Used (LRU) algorithm for sweeping the cache. That is to say, when\nthe overall size of the cache is above its limit, the items that have been\naccessed the longest time ago are removed from the cache in order to make room\nfor new items. _euthanize_ is an implementation of LRU for **filesystem-based**\ncaching systems.\n\nAside from caching systems, you may also find _euthanize_ useful for keeping\nnoncritical data (such as personal download folders) to a manageable size.\n\n## Installation\n\nUse Make to install _euthanize_. This automated method first runs a suite of\ntests in order to determine whether your operating system is supported.\n\n    $ make install\n\n## Usage\n\nSupply a `--help` or `-h` option in order to display help.\n\n    $ euthanize --help\n    Deletes least-recently-used files in a directory.\n\n    Usage:\n\n    euthanize --version\n    euthanize  -v\n\n      Displays the current version of euthanize.\n\n    euthanize --help\n    euthanize  -h\n\n      Displays this help message.\n\n    euthanize [--verbose] --size SIZE PATH\n    euthanize  [-V]        -s    SIZE PATH\n\n      Deletes files in PATH only if PATH is estimated to exceed SIZE, which is\n      interpreted as a number of bytes. If SIZE includes a scale indicator, then\n      it is scaled as:\n\n        kb   kilobytes (1000 bytes)\n        mb   megabytes (1000 kilobytes)\n        gb   gigabytes (1000 megabytes)\n        tb   terabytes (1000 gigabytes)\n        pb   petabytes (1000 terabytes)\n        eb   exabytes (1000 petabytes)\n        zb   zettabytes (1000 exabytes)\n        yb   yottabytes (1000 zettabytes)\n\n        kib  kibibytes (1024 bytes)\n        mib  mebibytes (1024 kibibytes)\n        gib  gibibytes (1024 mebibytes)\n        tib  tebibytes (1024 gibibytes)\n        pib  pebibytes (1024 tebibytes)\n        eib  exbibytes (1024 pebibytes)\n        zib  zebibytes (1024 exbibytes)\n        yib  yobibytes (1024 zebibytes)\n\n      PATH must be an existing directory or regular file.\n\nTrim a directory _foo_ down to 1 MB in size.\n\n    $ euthanize --size 1mb foo\n\n## Contributing\n\n1. [Fork][fork-euthanize] the official repository.\n2. Create your feature branch: `git checkout -b my-new-feature`.\n3. Commit your changes: `git commit -am 'Add some feature'`.\n4. Push to the branch: `git push origin my-new-feature`.\n5. [Create][compare-euthanize-branches] a new pull request.\n\nEspecially appreciated are patches for cross-platform compatibility. Run the\nautomated tests via Make.\n\n    $ make test\n\n## License\n\nReleased under the [MIT License][MIT-License].\n\n[memcached]:                  http://www.memcached.org\n[fork-euthanize]:             https://github.com/njonsson/euthanize/fork                   \"Fork the official repository of ‘euthanize’\"\n[compare-euthanize-branches]: https://github.com/njonsson/euthanize/compare                \"Compare branches of ‘euthanize’ repositories\"\n[MIT-License]:                https://github.com/njonsson/euthanize/blob/master/License.md \"MIT License claim for ‘euthanize’\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjonsson%2Feuthanize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjonsson%2Feuthanize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjonsson%2Feuthanize/lists"}