Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

.deb is the extension of the Debian software package format and the most often used name for such binary packages. Debian packages are also used in distributions based on Debian, such as Ubuntu and others.

How do I install/uninstall a .deb package directly?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

A .deb file is simply a zipped and tarred file, like a .tar.bz2 or .tar.gz, so you can use tar to unzip it. Grab the .deb you want to install, go into a directory into which you want it expanded, and simply tar xf /path/to/package.deb. You will then see three files: debian-binary, which contains (I believe) a deb version number, control.tar.gz, which contains metadata and install/uninstall scripts, and data.tar.gz, which contains the actual files. To extract the files, run mkdir root; tar Cxf root data.tar.gz and you will have a directory structure in ./root that mirrors the structure where the files would be installed in the actual file system. You can find the file you're looking for there.

If you want the entire package installed, I very strongly suggest you use dpkg to actually install it (sudo dpkg -i /path/to/package.deb), as it will automatically run the pre- and post-install scripts if needed, keep track of what's installed where, and allow you to uninstall it cleanly and easily. But if you really feel the need to bypass all package managers, you can use sudo tar Cxf / data.tar.gz to extract the files into the root directory tree, which should place everything where it is meant to go. But do run or at least check for preinst and postinst scripts in the control.tar.gz archive to see if you need to do anything important before or after installing.

share|improve this answer

Or install Gdebi.

Then RIGHT click on the download and choose: Open with "Gdebi Package Installer"

share|improve this answer
    
Thanks for the tip, i added it in my reply –  Zignd Jun 23 '12 at 21:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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