...

/

Repository Management with Aptly

Repository Management with Aptly

Learn about repository management software and how to manage repositories using Aptly.

Creating an Aptly repository

Aptly is part of the standard Debian and Ubuntu repositories, so usually we can install it easily:

$ apt install aptly

Then, we can create our first Aptly repository with a command like this:

$ aptly repo create -distribution=bullseye \
-component=main \
-architectures=amd64,all \
my-repo
Creating an Aptly repository

Here, my-repo is the name for our fictitious repository.

By default, Aptly creates a $HOME/.aptly.conf configuration file in JSON format and puts all of its files in the $HOME/.aptly/ directory. We can specify an alternative config file with aptly -config=<yourpath> <subcommand>.

Adding a Debian package to a repository

We can add Debian packages to our repo with:

$ aptly repo add <repo-name> <.deb-file>
Adding a Debian package to a repository

So in our example, this might be:

$ aptly repo add my-repo
...