dpkg-repack

puts an unpacked .deb file back together

Install

All systems
curl cmd.cat/dpkg-repack.sh
Debian Debian
apt-get install dpkg-repack
Ubuntu
apt-get install dpkg-repack
image/svg+xml Kali Linux
apt-get install dpkg-repack
Windows (WSL2)
sudo apt-get update sudo apt-get install dpkg-repack
Raspbian
apt-get install dpkg-repack

dpkg-repack

puts an unpacked .deb file back together

dpkg-repack creates a .deb file out of a package that has already been installed. If any changes have been made to the package while it was unpacked (ie, files in /etc were modified), the new package will inherit the changes. This utility can make it easy to copy packages from one computer to another, or to recreate packages that are installed on your system, but no longer available elsewhere, or to store the current state of a package before you upgrade it.