Install dpkg-repack by entering the following commands in the terminal:
sudo apt update sudo apt install dpkg-repack
Debian package archiving tool
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 (i.e. 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.