sources.list.d

I love apt, the binary package manager for Debian and Ubuntu. It is fantastic. The only drawback is it’s always a bit scary to add extra repositories to the sources that it draws from. In particular I don’t care for editing the single global file /etc/apt/sources.list.

There’s a better way! In addition to /etc/apt/sources.list, apt will also read files in /etc/apt/sources.list.d. It only loads files named *.list for some reason, but it will append all those files to its group of sources. So you can keep the main sources.list file pristine from the distro and then add your custom repositories as separate files. Yay!

There’s also an extra tool for managing apt repositories from the command line, add-apt-repositories (aka addrepo). It has shortcuts for adding PPAs, also seems smart about getting signing keys.