{"id":37195605,"url":"https://github.com/lylex/drm","last_synced_at":"2026-01-14T22:44:38.947Z","repository":{"id":57586415,"uuid":"158194825","full_name":"lylex/drm","owner":"lylex","description":"A safe and convenient \"rm\" replacement.","archived":false,"fork":false,"pushed_at":"2019-01-24T03:27:43.000Z","size":162,"stargazers_count":4,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T17:34:16.877Z","etag":null,"topics":["golang","rm","tool"],"latest_commit_sha":null,"homepage":"","language":"Go","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/lylex.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":"2018-11-19T09:25:48.000Z","updated_at":"2024-06-20T17:34:16.878Z","dependencies_parsed_at":"2022-09-13T12:41:57.426Z","dependency_job_id":null,"html_url":"https://github.com/lylex/drm","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/lylex/drm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lylex%2Fdrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lylex%2Fdrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lylex%2Fdrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lylex%2Fdrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lylex","download_url":"https://codeload.github.com/lylex/drm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lylex%2Fdrm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["golang","rm","tool"],"created_at":"2026-01-14T22:44:38.265Z","updated_at":"2026-01-14T22:44:38.935Z","avatar_url":"https://github.com/lylex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg\n    src=\"logo.png\"\n    width=\"300\" height=\"200\" border=\"0\" alt=\"drm\"\u003e\n\u003cbr\u003e\n\u003ca href=\"https://travis-ci.org/lylex/drm\"\u003e\u003cimg src=\"https://img.shields.io/travis/lylex/drm.svg?style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://goreportcard.com/report/github.com/lylex/drm\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/lylex/drm?style=flat-square\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n\u003ca href=\"https://godoc.org/github.com/lylex/drm\"\u003e\u003cimg src=\"https://img.shields.io/badge/api-reference-blue.svg?style=flat-square\" alt=\"GoDoc\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/lylex/drm/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/lylex/drm\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/lylex/drm/master.svg?style=flat-square\" alt=\"Code Coverage\"\u003e\u003c/a\u003e\n\u003ca href=\"https://golang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Go-1.11-blue.svg\" alt=\"Golang\"\u003e\u003c/a\u003e\n\u003ca href=\"https://golang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Supports-Linux-green.svg\" alt=\"Linux\"\u003e\u003c/a\u003e\n\u003ca href=\"https://golang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Supports-macOS-green.svg\" alt=\"MacOS\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nDrm, pronounced like \"dream\". It is a tiny tool to avoid tragedies caused by `rm`. Actually, I did decide to write it after I `rm`ed a whole day's hard-work. It can replace `rm` in basic function, and support resume deleted files before it reaches the expiration days(e.g. 30 days).\n\nFeatures\n========\n\n- `rm` a file or directory\n- View deleted files or directories\n- Resume deleted objects\n- Auto-purge delete object after configed TTL days\n\n\nGetting Started\n===============\n\n## Installing\n\n### MacOS\n\nDownload released packages from [release page](https://github.com/lylex/drm/releases), e.g. drm_v0.1.0_Darwin_x86_64.tar.gz\n\nRun the following commands:\n\n```shell\ntar -xzf drm_v0.1.0.tar.gz\ncd drm\nsudo ./scripts/mac/install_mac.sh\n```\n\n### Linux\n\nDownload binary from [release page](https://github.com/lylex/drm/releases), e.g. drm_v0.1.0_Linux_x86_64.deb\n\nrun the following commands:\n\n```shell\nsudo dpkg -i drm_v0.1.0_Linux_x86_64.deb\n```\n\n## Use\n\nAfter installation, binary is copied to executable path, and alias to replace `rm` is added to /etc/profile. Now you can use `drm` just like `rm` which you are familiar with.\n\n```\n$ rm --help\n\nThis application is used to rm files with a latency.\n\nUsage:\n  drm [flags]\n  drm [command]\n\nAvailable Commands:\n  help        Help about any command\n  list        list all the deleted objects\n  restore     restore one or more the deleted objects\n\nFlags:\n      --config string   config file (default is /etc/drm/drm.conf) (default \"/etc/drm/drm.conf\")\n  -f, --force           ignore nonexistent files and arguments, never prompt\n  -h, --help            help for drm\n  -r, --recursive       remove directories and their contents recursively or not\n      --version         version for drm\n\nUse \"drm [command] --help\" for more information about a command.\n```\n\n### Delete a directory\n\nJust run `rm -rf ./dir` or `drm -rf ./dir`, since they are alias now.\n\n### List deleted files\n\n```\ndrm list\n```\n\nor \n\n```\nrm list\n```\n\nAnd you will see something like:\n\n```\nName       Path                                 DeleteAt             ID\n----       ----                                 --------             --\nLICENSE    /Users/lylex/workspace/drm/dist/temp  2018-12-22 22:38:13  Rvv3Jg\nREADME.md  /Users/lylex/workspace/drm/dist/temp  2018-12-22 22:38:34  SHgtPG\n```\n\n### Resume a file a directory\n\nRun\n\n```\ndrm restore testfile\n```\n\nOr\n\n```\nrm restore testfile\n```\n\nThen the file \"testfile\" will be resumed.\n\n\n✋ Contributing\n========\n\nI will be so happay if this tiny tool can help you in any way. And I am really glad if you can help make it better. So please feel free to contribute by\n\n- Opening an [issue](https://github.com/lylex/drm/issues/new)\n- Sending me feedback via [email](mailto://xuqianzhou@gmail.com)\n\nLicense\n========\n\nDrm source code is available under the MIT [License](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flylex%2Fdrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flylex%2Fdrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flylex%2Fdrm/lists"}