DPKG-REPACK(1) | dpkg suite | DPKG-REPACK(1) |
dpkg-repack - put an unpacked .deb file back together
dpkg-repack [option...] package-name...
dpkg-repack creates a .deb file out of a Debian package that has already been installed on your system.
If any changes have been made to the package while it was unpacked (e.g. conffiles files in /etc modified), the new package will inherit the changes. (There are exceptions to this, including changes to configuration files that are not conffiles, including those managed by ucf.)
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.
Note: dpkg-repack will place the created package in the current directory.
There is a tricky situation that can occur if you dpkg-repack a package that has modified conffiles. The modified conffiles are packed up. Now if you install the package, dpkg(1) does not realize that the conffiles in it are modified. So if you later upgrade to a new version of the package, dpkg(1) will believe that the old (repacked) package has older conffiles than the new version, and will silently replace the conffiles with those in the package you are upgrading to.
While dpkg-repack can be run under fakeroot(1) and will work most of the time, fakeroot -u must be used if any of the files to be repacked are owned by non-root users. Otherwise the package will have them owned by root. dpkg-repack will warn if you run it under fakeroot(1) without the -u flag.
2019-03-01 | 1.45 |