Skip to content

Instantly share code, notes, and snippets.

@XMB5
Last active September 18, 2018 19:52
Show Gist options
  • Save XMB5/45cb6f391bb2a1accff7eaabf653ce66 to your computer and use it in GitHub Desktop.
Save XMB5/45cb6f391bb2a1accff7eaabf653ce66 to your computer and use it in GitHub Desktop.
Change deb file compression algorithm
COMP=gzip
for i in *.deb; do
echo "$i"
mkdir "$i.extract"
dpkg-deb -R "$i" "$i.extract"
rm "$i"
dpkg-deb -b "-Z$COMP" "$i.extract" "$i"
rm -rf "$i.extract"
done
@XMB5
Copy link
Author

XMB5 commented Sep 18, 2018

-Zcompress-type
        Specify which compression type to use when building a package.
        Allowed values are gzip, xz, bzip2 (deprecated), lzma (deprecated),
        and none (default is xz).

https://manpages.debian.org/jessie/dpkg/dpkg-deb.1.en.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment