{"id":15163148,"url":"https://github.com/lostatc/debctl","last_synced_at":"2025-10-25T00:31:55.861Z","repository":{"id":203507044,"uuid":"667061267","full_name":"lostatc/debctl","owner":"lostatc","description":"A CLI tool for managing apt repositories","archived":false,"fork":false,"pushed_at":"2024-09-17T21:36:01.000Z","size":391,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T18:49:11.904Z","etag":null,"topics":["apt","deb822","debian","packaging","ubuntu"],"latest_commit_sha":null,"homepage":"","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/lostatc.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":"2023-07-16T14:11:35.000Z","updated_at":"2024-10-20T16:27:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"7babf2aa-11f4-40ad-bc0d-79648641908b","html_url":"https://github.com/lostatc/debctl","commit_stats":null,"previous_names":["lostatc/debctl"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostatc%2Fdebctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostatc%2Fdebctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostatc%2Fdebctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostatc%2Fdebctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lostatc","download_url":"https://codeload.github.com/lostatc/debctl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238053514,"owners_count":19408699,"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":["apt","deb822","debian","packaging","ubuntu"],"created_at":"2024-09-27T02:04:16.040Z","updated_at":"2025-10-25T00:31:55.490Z","avatar_url":"https://github.com/lostatc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests Workflow Status (main)](https://img.shields.io/github/actions/workflow/status/lostatc/debctl/test.yaml?branch=main\u0026label=Tests\u0026style=for-the-badge\u0026logo=github)](https://github.com/lostatc/debctl/actions/workflows/test.yaml)\n[![Crates.io](https://img.shields.io/crates/v/debctl?logo=rust\u0026style=for-the-badge)](https://crates.io/crates/debctl)\n\n# debctl\n\ndebctl is a CLI tool for managing apt repositories. It's intended as a\nreplacement for\n[add-apt-repository](https://manpages.debian.org/buster/software-properties-common/add-apt-repository.1.en.html)\nand [apt-key](https://manpages.debian.org/testing/apt/apt-key.8.en.html) that\nsupports the newer\n[deb822](https://manpages.debian.org/stretch/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT)\nformat and implements modern best practices for managing signing keys.\n\n*What's wrong with the existing tools?*\n\n- `add-apt-repository` adds repository entries to `/etc/apt/sources.list`, which\n  is being phased out by the newer deb822 format.\n- `apt-key` is deprecated because it trusts signing keys for *all* apt\n  repositories instead of just the ones they're meant to be signing.\n\nThis tool tries to encourage best practices while providing escape hatches for\ndoing weird stuff.\n\n## Installation\n\nInstall [Rust](https://www.rust-lang.org/tools/install) and run:\n\n```shell\ncargo install debctl\n```\n\nThis tool shells out to GnuPG for working with PGP keys, so you must have `gpg`\ninstalled and available on your `PATH`.\n\n## Examples\n\nLet's add the [Docker apt\nrepository](https://docs.docker.com/engine/install/ubuntu/) to your system:\n\n```shell\ndebctl new \\\n    --name docker \\\n    --uri https://download.docker.com/linux/ubuntu \\\n    --key https://download.docker.com/linux/ubuntu/gpg \\\n    --component stable\n```\n\nThis downloads the signing key for the repository and installs it under\n`/etc/apt/keyrings/`. It can fetch the signing key from a URL, a local file\npath, or a keyserver and install it to a keyring or inline it into the\n`.sources` file.\n\nThis command creates the repository entry at\n`/etc/apt/sources.list.d/docker.sources`. Here's what that file looks like:\n\n```\nEnabled: yes\nTypes: deb\nURIs: https://download.docker.com/linux/ubuntu\nSuites: jammy\nComponents: stable\nSigned-By: /etc/apt/keyrings/docker.gpg\n```\n\nMost documentation for third-party apt repositories directs users to use\n`add-apt-repository`. This tool accepts the old-style syntax used by\n`add-apt-repository` and converts it to deb822 syntax:\n\n```shell\ndebctl add \\\n    --name docker \\\n    --key https://download.docker.com/linux/ubuntu/gpg \\\n    'deb [arch=amd64 lang=en,de] https://download.docker.com/linux/ubuntu jammy stable'\n```\n\nHere's the file that command generates:\n\n```\nEnabled: yes\nTypes: deb\nURIs: https://download.docker.com/linux/ubuntu\nSuites: jammy\nComponents: stable\nSigned-By: /etc/apt/keyrings/docker.gpg\nArchitectures: amd64\nLanguages: en de\n```\n\nYou can also convert existing old-style `.list` files to deb822-style `.sources`\nfiles:\n\n```shell\ndebctl convert --name docker\n```\n\nThis replaces `/etc/apt/sources.list.d/docker.list` with\n`/etc/apt/sources.list.d/docker.sources`.\n\nEntries that are commented out in the `.list` file are included in the\n`.sources` file, but with the `Enabled: no` option set. Regular comments in the\n`.list` file are preserved and included in the `.sources` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostatc%2Fdebctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostatc%2Fdebctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostatc%2Fdebctl/lists"}