Repacking Debian .deb package using different compression

Uncategorized 0 Comments

Just a quick howto on repacking Debian .deb package from one compression to the other.

  1. Create a temporary directory:
    mkdir ./tmp
  2. Extract the package contents:
    dpkg --extract package.deb ./tmp
  3. Extract the control files (must be done to a directory called DEBIAN):
    dpkg --control package.deb ./tmp/DEBIAN
  4. Create the new package (-Z accepts gzip, bzip2, xz and none):
    dpkg-deb --build -Zgzip ./tmp package_gzip.deb
  5. Profit.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.