I was recently in a discussion about meta-packages, and realized many users don’t know what they are or what they do. So, let’s see if we can clear-up the mystery.
Meta-packages in a nutshell
A ‘meta-package’ is a convenient way to bulk-install groups of applications, their libraries and documentation. Many Linux distributions use them for a variety of purposes, from seeding disk images that will go on to become new releases, to creating software “bundles” that are easy for a user to install. A meta-package rarely contains anything other than a changelog and perhaps copyright information, it contains no applications or libraries within itself. The way they work is by having a list of “dependencies” that the package manager reads. The package manager then goes to the repositories to find the dependencies and installs them.
As an example, let’s imagine we’re running Lubuntu, with the LXDE desktop and we want to try Ubuntu-MATE. We already have the Ubuntu base system, so all we need is the Ubuntu-MATE desktop. There’s a lot of packages that make up the default MATE desktop! There’s Marco, mate-panel, Pluma, Atril, Engrampa, EOM, Caja, etc., etc., plus the libraries, plugins, applets, documentation… simply a lot of stuff. Trying to install it package-by-package would be a real pain in the butt. In the end we’d almost certainly be missing bits that should be there for a proper Ubuntu-MATE experience. Rather than go through that exercise in frustration, we can simply install the meta-package ‘ubuntu-mate-desktop’. The meta-package will then go out and install all that we need for a proper MATE install. We install one package, it does the rest. Simple, convenient.
Meta-packages are for more than just installing desktop environments. They can be used to group together and install application “bundles” for particular tasks, like photographic processing, video processing, web development, digital art, and more. Anything that requires several applications and their support libraries could be a candidate for a meta-package. In fact, many distributions use them for that purpose.
Is that all they do?
That depends on what is being installed. Generally a software “bundle” meta-package is a one-time-use thing. Many will say in their description “After installation this package can be safely removed.” Once the software itself is installed, the package manager will take care of updates for the installed applications and libraries, so the meta-package is no longer required. Those can be removed with no penalty.
Others, like ones that install an entire desktop environment, will depend more on the user’s long-term goals. Meta-packages are often used for more than installing the current versions of software. They can also be used for upgrading.
Going back to our example of installing Ubuntu-MATE from a meta-package, let’s say we really like MATE and plan on using it well into the future. We’ve heard that the next release version of MATE is going to have some cool new applications, so we’re looking forward to trying them out. We also plan on just upgrading our existing install when the new release hits the servers instead of doing a complete reinstall from an iso image. When we do the upgrade, the meta-package will get upgraded along with everything else. In the new meta-package version will be dependencies for the new applications, so the package manager will install them too, even though they weren’t already on our system. The meta-package ensures our upgrade gets everything that makes up the newest version of MATE desktop – all the existing applications and all the new ones. So we’d now have the newest MATE with all the newest stuff.
“I want to remove application Y, but the package manager says it’s a dependency of meta-package Z. Can I remove Z too?”
Again, that depends on what the meta-package was designed to do and what you plan to do long-term. Let’s say the meta-package was for installing a photographic processing tool suite. When the meta-package is viewed in a package manager, it should state in its description that it can be safely deleted, in which case the answer is “yes”, you can remove it. If the meta-package doesn’t explicitly state it is safe to remove, then we’re probably dealing with one that’s designed to help with upgrades. In that case, we have a choice to make. We can remove any meta-package; removing it will not affect our currently installed system and software. But we’ll also have removed an upgrade tool. If a new release comes out with new software (apps and libraries that weren’t on the original install) without the meta-package when we do the upgrade, only currently installed software will be upgraded. None of the new stuff will get installed unless by chance one of the existing upgraded apps now depends on it.
If we plan on doing a network upgrade instead of re-installing from an iso image, and we want to ensure a smooth experience and get all the newest apps then it’s best to leave the meta-package installed. If there’s an application the meta-package installed that we don’t want to use, just leave it and install what we want. With today’s large hard drives, the few megabytes the unwanted application occupies on it isn’t worth worrying about. If having the unwanted application show up in the main menu is annoying, check with the desktop’s documentation on how to edit the menus and remove its entry.
NOTE: Some applications will require changing file associations, so the desktop and file manager know to use the new application for working with those files. That’s generally done by right-clicking with the file manager on one of the associated files and changing its properties, usually something titled “Open With” or “File Association”. If unsure, check with the desktop’s documentation or on their website for how to change file associations.
If on the other hand disk space is at a premium, and/or you don’t care about future upgrades, then yes, you can safely remove the meta-package. Removing the meta-package does not remove any other currently installed software or cause dependency issues with any other currently installed software. The only thing potentially broken is the ability to do a complete release upgrade.
“I removed the meta-package and now my package manager says all the ‘automatic’ installs are ‘manual’. What gives?”
Applications and libraries that are installed as dependencies of something else are called “automatic” installs in some package managers. They were installed because some other package needed them – in our case, the meta-package. Packages we install ourselves are considered “manual” installs. If we install an application that wasn’t on the original iso image, it will show up in some package managers as “installed, manual” or similar wording. All “manual” means is the user chose to install it, not some other package as a dependency. When we remove a meta-package any application or library that was installed as a dependency of it will be re-marked as manually installed. It’s nothing to worry about. Nothing will be removed or fail to update because of it.
For example, let’s say we install Cherrytree, a note-taking application, on Ubuntu-MATE. Cherrytree doesn’t come with MATE; we installed it. It shows up in the Synaptic package manager as “Installed (manual)” under the Status section. Unless we ourselves remove it, Cherrytree will be there. Doing an ‘apt-get autoremove’ to clean up old residuals or doing a system upgrade will not affect Cherrytree at all. We installed it, we want it there and the package manager is smart enough to know that. Same holds true for all the packages that were ‘automatic’ and are now ‘manual’ because we removed the meta-package. The package manager no longer sees them as dependencies of the meta-package. Instead, it sees them as something the user installed and treats them accordingly. They continue to get updates and be treated just like any other package we install ourselves.
In summary, meta-packages make user installation of what could be a confusing mass of software easy. They make seeding disk images for new releases simpler for distributions. And, they often provide a convenient method for ensuring smooth, complete release upgrades. If you’ve read this far, hopefully we’ve shed some light on the mystery of meta-packages for you.