Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 693 Bytes

Deb_file.md

File metadata and controls

32 lines (22 loc) · 693 Bytes

Unpack, modify and repack deb files

There are deb instances where you need to modify some file(s) inside and repack it.

This can be done very easily on Ubuntu and Debian using dkpg-deb


  1. Copy the deb file into a directory

  2. Create the directory structure

    $ mkdir -p newpack oldpack/DEBIAN
  3. Extract the filesystem tree

    $ dpkg-deb -x file.deb oldpack/
  4. Extract the control information files

    $ dpkg-deb -e file.deb oldpack/DEBIAN
  5. Modify what that you need

  6. Repackage the deb file under newpack directory using xz compression

    $ dpkg-deb -Z xz -b oldpack/ newpack/