Debdelta

Debdelta is an application that tries to make it easier to upgrade to a newer version of a package by downloading only the difference in the two deb files. As a result, it reduces the amount of data downloaded (beneficial if you have a slow or unreliable network connection), but does so at the cost of using more CPU power.

All of my PPAs have debdelta support. This provides the most gain for my Flightgear PPAs due to the size of the data package. Debdeltas are generated frequently throughout the day on a server, so if debdeltas aren't available, and you don't want to download the full package, wait a few hours.

Setting Up Debdelta

To set up debdelta: (this needs to be done only once)

  1. Install debdelta (sudo apt install debdelta)
  2. Open up /etc/debdelta/sources.conf. The default file has two entries for Debian; you'll probably want to comment these out or remove them (prefix a line with # to comment that line). Add in one or more of the following into the file, then save it and close it:
    1. To use debdeltas for the Flightgear Stable PPA, add:
      [flightgear stable ppa]
      Origin=LP-PPA-saiarcot895-flightgear
      Label=FlightGear Flight Simulator
      delta_uri=http://debdeltas.saiarcot895.cloudns.pro/flightgear-stable-deltas
    2. To use debdeltas for the Flightgear Edge PPA, add:
      [flightgear edge ppa]
      Origin=LP-PPA-saiarcot895-flightgear-edge
      Label=FlightGear Flight Simulator Daily
      delta_uri=http://debdeltas.saiarcot895.cloudns.pro/flightgear-edge-deltas
    3. To use debdeltas for the Chromium Beta PPA, add:
      [chromium beta ppa]
      Origin=LP-PPA-saiarcot895-chromium-beta
      Label=Chromium Beta branch
      delta_uri=http://debdeltas.saiarcot895.cloudns.pro/chromium-beta-deltas
    4. To use debdeltas for the Chromium Dev PPA, add:
      [chromium dev ppa]
      Origin=LP-PPA-saiarcot895-chromium-dev
      Label=Chromium Dev branch
      delta_uri=http://debdeltas.saiarcot895.cloudns.pro/chromium-dev-deltas
  3. Run sudo gpg --homedir /etc/debdelta/gnupg/ --keyserver keyserver.ubuntu.com --recv-keys 0x203B47C2C66B784B. This installs my personal GPG key, which is used to sign my debdeltas repo.

Using Debdeltas

To use debdeltas:

  1. Run sudo apt update to update your package lists (or use whatever frontend you prefer for this step).
  2. Run sudo debdelta-upgrade --deb-policy b,e to get whatever debdelta files are available (based on the configuration you have in /etc/debdelta/sources.conf) and patch them into the existing debs you already have. The --deb-policy says "only get the original deb files if the patch is too big or the patch errors out for whatever reason". (The default policy also automatically gets the original deb files for packages that don't have a debdelta repo configured as well, but I personally prefer to get this separately.) If you don't mind downloading all upgradeable packages in one command, you can just run sudo debdelta-upgrade.
  3. Run sudo apt upgrade to upgrade your packages (or use whatever frontend you prefer for this step). If everything worked out correctly, your download size should be smaller (much smaller in the case of not having to download data packages).