Debcow is an experimental implementation of deploying Debian packages on copy-on-write file-systems like Btrfs and Bcachefs. Debcow adapts DPKG to use reflinks for installing packages. With reflinking to the file contents from the Debian package archives rather than copying of files, it can lead to a dramatic speed-up of installing Debian packages: as much as 6x faster on CoW file-systems.
Open-source developer Matteo Croce is leading the Debcow effort to optimize deploying Debian packages on copy-on-write file-systems using reflinks. He’s finding that packages with big files can install around six times faster thanks to using reflinks rather than just copying of files. Debcow transforms the Debian packages during the download phase and then a patched version of dpkg installs these packages.
Debcow has been tested so far with file-systems like Btrfs and XFS. Debcow is currently hosted via this GitHub repository while it undergoes testing and further experiments.
There are benchmarks shown with the GitHub repository for this CoW optimization for Debian packages. Beyond the 6x factor in most extreme cases, as a real-world comparison when using dpkg to dist-upgrade from Ubuntu 24.04 to Ubuntu 24.10 it takes 90 minutes out of the box. If using dpkg CoW the installation time drops by more than half down to 44 minutes.
Debcow is a very promising effort and with more copy-on-write file-system use coming about, it will be interesting to see if upstream Debian as well as other Linux distributions begin thinking more about leveraging the modern file-system features.