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.

What are these file formats and how do they differ from the .msi format in Windows? Also what are the pros and cons of these package management schemes?

share|improve this question
    
.deb and .rpm are more similar to .msi than to .exe. –  Ignacio Vazquez-Abrams Dec 3 '13 at 17:10
    
changed the question. thanks –  deathholes Dec 3 '13 at 17:16
    
note: asking "what are the pros and cons of rpm vs deb/dpkg" elsewhere on the internet carries with it the possibility of inciting a flame war. –  strugee Dec 4 '13 at 5:08
add comment

6 Answers

Files such as .deb and .rpm are more akin to a .zip file. They're a directory tree of files and sub-directories that contain files related to a particular application and/or library of files.

Distros

The .deb files are meant for distributions of Linux that derive from Debian (Ubuntu, Linux Mint, etc.). The .rpm files are used primarily by distributions that derive from Redhat based distros (Fedora, CentOS, RHEL) as well as by the openSuSE distro.

What's special about them?

These files have one other special trait that sets them apart from .zip files, in that they can include a specification that contains rules that tell the package manager software running on a system that's installing one of these files to do additional tasks. These tasks would include things such as:

  • creating user accounts on the system
  • creating/modifying configuration files that aren't actually contained in the .deb or .rpm file
  • set ownership/permissions on the files after installation
  • run commands as root on the system that's installing the package
  • dependencies, both formats can include names or packages and/or service names that they require to be present on a system, prior to installation.

What about .msi files?

.msi files are similar to .deb & .rpm files but likely even more sophisticated. The .msi files are utilized by the Windows Installer and offer additional features such as:

  • GUI Framework
  • generation of uninstall sequences
  • A framework within itself - for use by 3rd party installers
  • Rollbacks
  • Advertisement
  • User Interface
  • etc.

I'd suggest taking a look at the various Wikipedia pages on these subjects if you want a more in-depth explanation.

References

share|improve this answer
    
@AlvinWong - the OP changed the nature of the Q after I answered this yesterday. Strugee was just alerting me to it, and I've since fixed the A to address these changes. –  slm Dec 4 '13 at 13:24
    
@AlvinWong - if you're ever wondering what's changed about a Q or A you can click the "edited ... hours ago" link under it. –  slm Dec 4 '13 at 13:25
    
Since the answer starts with "Files such as .deb and .rpm are more akin to a .zip file" it might be worth mentioning that deb packages are actually ar archives, and rpms are (possibly in part) cpio archives. In the case of debs it is easy to verify that a deb can be unpacked with ar -x. In the case of rpm I don't know if this is possible. –  Faheem Mitha Dec 4 '13 at 15:02
    
@slm yes, done now. –  strugee Dec 4 '13 at 16:16
    
@FaheemMitha: rpm2cpio package.rpm | cpio -idv –  ninjalj Dec 5 '13 at 15:22
show 2 more comments

The other answers touch upon qualities of .deb and .rpm that are similar to .msi. They all contain software in a compressed format that can do some extra things. Those extra things already mentioned included adding users, pre- and post-install tasks, registering the program with the system (e.g. windows registry, xdg-dirs, OpenRC/systemd init, etc).

What differentiates the formats (and is a huge pro) is dependencies. Both .deb and .rpm files can and do list names and versions of other programs that must be installed as pre-requisite software. By themselves, this is just informational, but...

You typically do not directly interact with .deb and .rpm files the way you do with .msi files. In fact, as alluded to earlier, a .deb is typically just an archive (ar or tar) compressed with xz with the contained files in a specific directory layout. Instead you use tools like dpkg and rpm to manipulate these files.

dpkg and rpm will install the contents of .deb and .rpm files and verify all pre-requisite software is installed. Running these programs is similar to clicking on a .msi file. Users however, do not typically interact with dpkg or rpm but instead use apt-get and yum to install packages. These tools do not have exact analogs on windows.

Both apt-get and yum are able to fetch files from remote (or local) repositories and use the dependency information stored in the .deb and .rpm files to fetch and install any pre-requisites not met. With these tools I do not need to know or worry about what other software I need, I can just specify apt-get install chromium and know that apt-get will make sure I have gtk+, alsa, certain X libraries, etc installed without me having to manually find and install those .deb and .rpm files.

apt-get and yum are the big two package managers, you'll also find emerge and pacman out there, which do the same jobs although with different underlying mechanisms.

share|improve this answer
6  
+1 for talking about dependency management. This should not be overlooked. –  ldrumm Dec 4 '13 at 3:15
1  
note: I believe .debs are packaged using the ar utility. no idea why. –  strugee Dec 4 '13 at 5:12
1  
also, if you're going to count emerge as a package manager, maybe you should also consider BSD ports (although I don't know much about them, so I'm not sure if they have the equivalent of a package manager on GNU/Linux). –  strugee Dec 4 '13 at 5:14
3  
@strugee true, I've edited to reflect that. Also techically, portage is package management engine behind emerge and it is very similar to ports. It is all source based and very configurable, but if a command will install/uninstall, handle dependencies and keep a database of installed packages, I'll call it a package manager. Good comments. –  casey Dec 4 '13 at 5:39
    
@casey : Where can i get more information about the underlying mechanisms of dpkg and rpm? –  deathholes Dec 5 '13 at 4:26
add comment

It has quite the same functionalities as an MSI file under Windows :

  • it registers the software in a registry,
  • it registers which files have been installed with that package.

Under Linux, they also manage dependencies between other packages.

This package managment formats do many other things, but this is the main functionalities.

share|improve this answer
add comment

.rpm files are RPM packages, which refer to the package type used by Red Hat and Red Hat-derived distros (e.g. Fedora, RHEL, CentOS). .deb files are DEB packages, which are the package type used by Debian and Debian-derivatives (e.g. Debian, Ubuntu).

When downloaded, they are typically installed via the rpm and dpkg commands respectively on the relevant distros. In other words, they are files that are installed by rpm and dpkg rather than .msi or .exe setup files which are executables that install themselves.

RPM and DEB packages differ from MSI in multiple ways.

  • As above, they are files that require other tools (i.e. rpm and dpkg) to install.
  • When installed, they are added to a database, which is not the case in MSI files. MSI files list the program in the registry, but an uninstall by Control Panel is unlikely to completely remove all installed files from disk. Thus, when RPM and DEB packages are uninstalled, all files are removed cleanly.
  • They are typically not downloaded and installed directly, but through package managers like yum and aptitude respectively - there are so-called repositories that offer packages compiled for the relevant system, and the package manager will install all dependencies automatically from data in the repositories.
  • Installed packages typically run several configuration tools, for example if you install GDM on a system already installed with LightDM, the tools ask if you would prefer to use GDM of LightDM.
  • When installing packages, other than dependencies some packages are suggested, which show packages not required but may be useful to the user.
share|improve this answer
add comment

Both .deb and .rpm are Software packages for GNU/Linux Distributions, containing software (program(s), application(s), etc.) and information for the "*installer *" software about the software itself and instructions about how to install what and where correctly.

  • .debDebian Software Package, on Debian (based) Distributions. Installed through e.g. apt/aptitude (Command line), or graphically via e.g. "Synaptic" "Ubuntu Software Center", "Gdebi", …
  • .rpmRed Hat Package Manager: in Fedora / Red Hat (based) Linux Distributions. Installed via e.g. yum (command line), or graphically via e.g. "yumex"
  • .msi is → Microsoft Installer: Quite the same as above, for Microsoft Windows OS

The installers themselves can also handle maintenance, updating and/or removal of packages. Also: here, "installer" means the software to accomplish this tasks correctly – it also provides the mentioned information for user itself, of course, to accomplish such tasks manually.

share|improve this answer
1  
PackageKit isn't an application. it's an abstraction library for the different package managers across distributions. –  strugee Dec 4 '13 at 5:16
    
@strugee dang, thought this was the name. I really hope yumex is the right name… thanks for the hint –  Chirp. Not Luke. Dec 4 '13 at 11:58
    
I believe the default on Fedora is GNOME Software. –  strugee Dec 4 '13 at 16:15
    
@strugee I tried Fedora for a while, used LXDE and remembered a graphical front-end for package management, but the name was… I guess, whatever works and suits one's desires best :) –  Chirp. Not Luke. Dec 4 '13 at 17:00
add comment

.deb: Debian package used for Debian-based Linux distros such as Ubuntu, Linux Mint etc.

.rpm: rpm installer for Red Hat-based Linux distros such as RHEL, Fedora and CentOS

.msi: Binary installer for Windows platform

share|improve this answer
    
welcome to Stack Exchange! an explanation of why you've been downvoted: I'm not one of the two people who downvoted, but my guess is that they did so because you're implying that Debian and/or Ubuntu aren't GNU/Linuxes, and that's false. they are. (and there are a lot more distributions than just Debian, Ubuntu and Fedora.) also, you didn't really explain anything. –  strugee Dec 4 '13 at 17:09
1  
Update: edited to remove that implication –  Davidson Chua Dec 5 '13 at 1:23
    
I guess the downvotes are really for just giving a one line description of what the file means, not the actual explanation of how these packages are different from each other. Have a look at the selected answer here, that is the kind of quality they expect from answers :) –  Munim Dec 6 '13 at 10:43
add comment

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.