You can install a .deb package file onto a system by using dpkg -i filename.deb.

Is it possible to do the reverse? By reverse, I mean create a .deb package file from an installed package given a package name?


Install dpkg-repack package:

sudo apt-get install dpkg-repack

Example usage:- dpkg-repack gparted

replace gparted with your package_name


| improve this answer | |
  • an example would be great ;) – Postadelmaga Mar 25 '15 at 1:25
  • @postadelmanga if you wanted to repack an independently installed program you may run sudo dpkg-repack vlc for say the vlc player. however, i do not know about other packages with dependencies and everything else. – Aditya Soni Oct 25 '15 at 12:52
  • 3
    You can use fakeroot -u dpkg-repack gparted to run it without root privileges, if your user can read all files of the package you want to rebuild. – Selivanov Pavel Mar 7 '17 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.