{"id":16898597,"url":"https://github.com/afbjorklund/debfile","last_synced_at":"2026-05-07T01:10:26.663Z","repository":{"id":229303673,"uuid":"775699289","full_name":"afbjorklund/debfile","owner":"afbjorklund","description":"dlocate query file cache","archived":false,"fork":false,"pushed_at":"2025-02-25T16:43:22.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-20T01:51:00.230Z","etag":null,"topics":["debian","dpkg"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afbjorklund.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-21T21:55:40.000Z","updated_at":"2025-02-25T16:43:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"10ed13eb-28a6-4d1d-9324-9a7bbc565b0d","html_url":"https://github.com/afbjorklund/debfile","commit_stats":null,"previous_names":["afbjorklund/debfile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/afbjorklund/debfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afbjorklund%2Fdebfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afbjorklund%2Fdebfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afbjorklund%2Fdebfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afbjorklund%2Fdebfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afbjorklund","download_url":"https://codeload.github.com/afbjorklund/debfile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afbjorklund%2Fdebfile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272815815,"owners_count":24997661,"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-30T02:00:09.474Z","response_time":77,"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":["debian","dpkg"],"created_at":"2024-10-13T17:44:30.878Z","updated_at":"2026-05-07T01:10:21.612Z","avatar_url":"https://github.com/afbjorklund.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debfile\n\nReturns which deb package owns a particular file, and its version too.\n\nSimilar to `dpkg -S` and `dpkg-query -W`, but much faster (uses [dlocate](https://github.com/afbjorklund/dlocate)).\n\nThe deb equivalent of running `rpm -qf`.\n\nRemember to run `sudo update-dlocatedb`.\n\n## zstd\n\nThe default dlocatedb takes a lot of disk space, when not compressed...\n\nBut compressing it with gzip, makes dlocate run much slower (like 10x)\n\nUse zstd instead, see: dlocate-zstd.diff\n\nStill compresses 10x, but runs 10x faster\n\n## grep\n\nFor reasons why dlocate is using text files and `grep`, instead of `locate`:\n\n\u003chttps://jvns.ca/blog/2015/03/05/how-the-locate-command-works-and-lets-rewrite-it-in-one-minute/\u003e\n\nThe debfile \"database\" maps from paths to packages, and packages to versions.\n\nBut since it doesn't use regular expressions, it can be converted into a dbm.\n\n## text\n\nFor debugging purposes or other experiments, you can make it output text:\n\n`DEBFILE_TEXT=1 ./convertdb.pl \u003e debfiledb`\n\nThe format is actually YAML, and can be converted to e.g. JSON using `yq`.\n\nOr one can use grep instead of gdbm, just like with the dlocate database.\n\n## cron\n\nThe dlocatedb is normally updated from `/etc/cron.daily/dlocate`\n\nYou can update the debfile.db as well, from the same daily job.\n\nSomething like this: dlocate-debfile.diff\n\nOr run `sudo /usr/share/dlocate/convertdb`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafbjorklund%2Fdebfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafbjorklund%2Fdebfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafbjorklund%2Fdebfile/lists"}