Pinterest Stumbleupon Whatsapp
Ads by Google

As a new Linux user, you may be completely overwhelmed with the sheer number of choices you have when it comes to distributions you can install to your computer. What is the difference between Ubuntu, Fedora, OpenSUSE, Sabayon, or Arch? Ultimately, the short answer is: package management. Each distro offers users a unique method of installing and maintaining your system, with varying degrees of user friendliness and usability.

This guide will serve as a short primer on how to perform basic tasks in each package management system, so you can decide which is right for you.

debian

1. Apt

Apt is a dependency resolver for Debian based systems, including Ubuntu Your Guide to Ubuntu Repositories and Package Management Your Guide to Ubuntu Repositories and Package Management Read More . In conjunction with dpkg, the package manager, Apt provides an easy way to update, upgrade, install and remove software. Without Apt, maintaining a Debian system would feel like using Linux in the early 1990’s, when “dependency hell” was an actual thing.

Apt has a pretty simple syntax, although it is currently being rewritten to provide an easier syntax. As such, depending on which version you are using (Ubuntu 14.04 and higher includes the new Apt commands), you may use different commands to achieve the same outcome.

To update software repositories, use the following command:

Ads by Google
sudo apt-get update

or

sudo apt update

To upgrade your software:

sudo apt-get upgrade

or

sudo apt upgrade

For a more thorough upgrade, which will also attempt to upgrade comflicting package dependencies to the newest version and removing older or unused dependencies, the command is as follows:

sudo apt-get dist-upgrade

or

sudo apt full-upgrade

These commands can be combined to perform an update and upgrade in succession like so:

sudo apt-get update && sudo apt-get upgrade

or

sudo apt update && sudo apt upgrade

To install software, the command is:

sudo apt-get install $packageName

or

sudo apt install $packageName

To remove a package:

sudo apt-get remove $packageName

or

sudo apt remove $packageName

When removing software from your system using the apt-get remove command, Apt does a good job of removing unused dependencies, however sometimes in the course of software removal or an upgrade, some straggler dependencies may remain on your system. If you have OCD like me, you may want these packages removed from your system. Apt includes a command I am quite fond of in this regard:

sudo apt-get autoremove

or

sudo apt autoremove

Searching for an installable package:

sudo apt-cache search $packageName

or

sudo apt search $packageName

Apt does not currently offer the ability to install a package from a URL, meaning the user must find and download the package to be installed on their own. Ubuntu and some of its derivitaves have managed to combat this with single-click apturl links, found on some websites.

redhat

2. YUM

Like Apt, YUM is a dependency resolver for the underlying package manager, RPM. YUM is the default package management system included in quite a few Red Hat based derivitaves, including Fedora 21 and below, and CentOS Don't Want To Pay For Red Hat Linux? Try CentOS Instead Don't Want To Pay For Red Hat Linux? Try CentOS Instead In case you don't know already, most of the web is powered by Linux -- Facebook, Twitter, Google, and a vast majority of other major Internet sites use Linux for their servers. While server administrators... Read More . The syntax for YUM is simple, and Apt users should have no problem making the switch.

Updating and upgrading through YUM is very simple, where the following command handles both tasks:

sudo yum update

To install a package, the following command is used:

sudo yum install $packageName

Likewise, to remove a package, the command is:

sudo yum remove $packageName

To search for an installable package:

sudo yum search $packageName

YUM does not include an autoremove command for finding and removing unused dependencies, however it does include a great feature for installing a package from a URL, which Apt does not include:

sudo yum install $url

opensuse

3. ZYpp

ZYpp is another dependency resolver for the RPM package management system, and is the default package manager for OpenSUSE How To Use openSUSE Factory, The New Rolling-Release Distribution How To Use openSUSE Factory, The New Rolling-Release Distribution Now, openSUSE has been automating QA tasks so that systems can test the stability of packages themselves, thus turning Factory into something that has brand new packages and actually has a decent expectation of stability. Read More and SUSE Linux Enterpise. ZYpp utilizes .rpm binaries, just like YUM, but is a bit faster due to being written in C++, where YUM is written in Python. ZYpp is extremely easy to use, as it includes command shortcuts which can be used in place of the full command.

Like YUM, ZYpp both updates and upgrades all packages using the following command:

sudo zypper update

or

sudo zypper up

To install a package:

sudo zypper install $packageName

or

sudo zypper in $packageName

To remove a package, use the command:

sudo zypper remove $packageName

or

sudo zypper rm $packageName

Search for an installable package:

sudo zypper search $packageName

Like YUM, there is no autoremove command included in ZYpp. Additionally, like Ubuntu, OpenSUSE has one-click install links for web based package installation.

fedora_logo

4. DNF, or Dandified YUM

DNF is a rewrite of YUM which utilizes features from ZYpp, most notably, the dependency resolving capabilities. DNF is the default package manager for Fedora 22 Be On The Bleeding Edge of Linux with Fedora Rawhide Be On The Bleeding Edge of Linux with Fedora Rawhide Don't wait around to try the latest versions of software – try Fedora Rawhide instead. Read More and higher, and should become the default system in CentOS in the future.

To update and upgrade all software:

sudo dnf update

To install a package:

sudo install $packageName

To remove a package:

sudo dnf remove $packageName

Search for an installable package:

sudo dnf search $packageName

Unlike YUM and ZYpp, DNF provides the autoremove command to search your system and remove unused dependencies:

sudo dnf autoremove

And DNF also allows for package installation from a URL:

sudo dnf install $url

Sabayon

5. Entropy

Entropy is the default package management system for Sabayon Linux Install Gentoo the Easy Way With Sabayon Install Gentoo the Easy Way With Sabayon Read More , a Gentoo derivitave. What makes Entropy interesting is Sabayon utilizes binary files through Entropy, and also source code through Gentoo’s package management system, Portage. A basic rundown for this system is as follows:

  • Source packages are built into binaries through Entropy, using Portage.
  • Entropy converts the built binary to an Entropy package.
  • The Entropy packages are added to the Sabayon repos.
  • The user installs a binary file through Entropy.

Entropy is comparable to Apt, YUM, ZYpp, and DNF, meaning it is beginner friendly with easy to use commands. Entropy also includes shortcuts for brevity.

To update software sources:

sudo equo update

or

sudo equo up

To upgrade all packages

sudo equo upgrade

or

sudo equo u

These commands can be used at the same time:

sudo equo update && sudo equo upgrade

or

sudo equo up && sudo equo u

To install a package:

sudo equo install $packageName

or

sudo equo in $packageName

To remove a package:

sudo equo remove $packageName

or

sudo equo rm $packageName

To search for an installable package:

sudo equo search $packageName

Arch-Linux

6. Pacman

Pacman is the default package management system for Arch Linux How to Install Arch Linux the Easy Way with Antergos How to Install Arch Linux the Easy Way with Antergos Old PC or laptop need a new lease of life? Thinking about switching to Linux, but don’t know where to start? With Antergos, you can install Arch Linux the easy way! Read More and its derivitaves, and is a complete package manager, not relying on underlying systems or frontends to resolve dependencies. Pacman utilizes a simple compressed .pkg.tar.xz file system, which contains all information needed to build source code into a working program. Think of pacman as a system to automate the process of manually building software from source code. Pacman utilizes a “helper” program, Yaourt, to install unofficial software found in the Arch User Repository, and when doing so, the command “pacman” is replaced by “yaourt.”

When working with packages, you will mostly utilize the “sync” flag (-S), which compares your system with the software repository. To refresh your software repos (-y):

sudo pacman -Sy

To upgrade your system, you modify your previous sync command with the sysupgrade flag (-u):

sudo pacman -Syu

To install a package, you must sync the package:

sudo pacman -S $packageName

To remove a package, pacman has a remove flag. To remove a package (-R), its configuration files (-n), and all unused dependencies, recursively, not installed explicitly by the user (-s). Note: this -s flag is different to the -s flag used in the sync command:

sudo pacman -Rns

To search for an installable package, you will sync and search (-s):

sudo pacman -Ss $packageName

Pacman does not include an autoremove command, however you can search for and remove any unused dependencies using the Query command. Note: again, these flags are not the same as the sync flags or remove flags. This command will query the database (-Q), check for orphaned dependencies (-t), restrict the search to dependencies (-d), and will not print the process out verbosely (-q, meaning “quiet”).

sudo pacman -Rns $(pacman -Qtdq)

Package Managers: Evolving

Linux has most definitely come a long way in providing new users the ability to manage their system easily. Package managers automatically find required dependencies and provide easy to remember commands for installing, and maintaining software, and users are no longer stuck in dependency hell, as they were when Linux was in its infancy. By testing out the many different package managers available to you, you can find your home in whichever distro you feel most comfortable in.

Which package manager is the easiest for you? Have you tried installing one of these package managers outside of the default distro? Let us know in the comments below!

  1. Sam Iyam
    August 18, 2016 at 1:42 pm

    "Without Apt, maintaining a Debian system would feel like using Linux in the early 1990’s, when “dependency hell” was an actual thing."

    I don't believe that "dependency hell" will be a thing of the past until second generation package managers become more common. Just search on "dependency hell" and "2016" to see that it's still a problem. Try StackOverflow also.

    A second generation package manager must:

    * Allow you to install two different programs that depend on different versions of a library at the same time.

    * Allow you to install software to a custom directory.

    Note that actual popular OS's like OSX and Windows allow you to do both.

    Actual second generation package managers:

    Nix can, but it is a disk hog. As to its promise, see:
    https://www.linux.com/news/nix-fixes-dependency-hell-all-linux-distributions
    It, however, is a disk hog, as it appears to have a hard time getting rid of unused versions of a given library. This will surely improve in later releases.

    PC-BSD has AppCafe.

    "[it] offers self-contained applications that internally satisfy their own dependencies. This approach shifts the burden to a greater storage requirement but allows for what are essentially micro userlands for each application and the result is a huge reduction in user and administrator frustration."
    See: http://callfortesting.org/pcbsd/
    I'm not thrilled about the devil symbology of the project, given the cruelty of the NWO satanists.

    Homebrew is a package manager for OSX that, like OSX, also allows you to install a program and all its dependencies into a specified directory. For Linux, it is Linuxbrew.
    Its repositories are small in content, but growing. I expect this one will make Linux a viable option in another 3-5 years.

    Most Linux package manager advocates throw up the outdated canard that keeping multiple versions of a library around for different apps is wasteful of disk space. All of these second generation package managers have made the trade-off of having all non-OS libraries in a directory with the app; truly ending dependency hell. OSX has been doing it that way for a long time. Just look:

    OSX, Windows: can have multiple versions of a library installed=popular. No dependency hell.

    Linux, usually CAN'T have multiple versions of a library installed=not popular, except for servers. Susceptible to dependency hell.

    Twice, I've tried to use Linux regularly, and got stuck in dependency hell, and gave up. I use audio software, and often want versions of softs that are not in the current distro's repos.

    Ideally, a better package manager could be developed, that:

    1. allows you to install software on different disks, as needed, and
    2. usually uses the most current version of a library, and even allows use of a newer version, so long as the API is compatible, but where two programs have a conflict in depending on different versions of a library, can accommodate both

    • Sam Iyam
      August 19, 2016 at 1:28 pm

      To state what I had in mind more clearly, we could use a package manager that:

      1. Allows you to install software where you like, like on popular operating systems (e.g. to compare different versions of a program, or on different disks for space purposes), and

      2. Gets rid of unused versions of libraries, and shares libraries where feasible, so as to save space; but still allows for different versions of a library to be installed. This would be better than OSX on this count; similar how Windows USED TO allow shared DLL's to be stored in \Windows\System32, before it started keeping all sorts of old versions around.

    • Sam Iyam
      August 19, 2016 at 1:39 pm

      Here are two more 2nd generation package managers:

      Guix: "based on Nix," although the syntax is quite different. It is the package manager for the up and coming Guix SD, the official distro of the GNU Herd.

      Manager: The package manager for Gobo Linux, a flavor of Linux that has a Mac-like directory structure, having all programs in "/Programs", and showed great promise, but took six years to release the 2014 update. A new update is promised for 2016 ...

      • Sam Iyam
        August 19, 2016 at 1:47 pm

        Er, "GNU Hurd"

  2. FileEagle.com Chris
    August 4, 2016 at 6:34 am

    When I was a student, I studied CentOs for the first time. Now I used CentOs for all my servers and YUM is a simple, easy-to-use package manager.

    • Michael Mason
      August 4, 2016 at 2:20 pm

      I agree YUM is a very powerful package manager. Especially when I remember dependency hell in the early Red Hat days! =(

  3. Jaden Peterson
    August 4, 2016 at 1:09 am

    I love APT and Pacman. My two favs

    • Michael Mason
      August 4, 2016 at 3:55 am

      Apt was my first, pacman is most definitely my favorite. =)

  4. fcd76218
    August 4, 2016 at 12:23 am

    For the Debian-based distros, a user by the handle of 'h2' developed a very powerful tool for updating system and application software. It is called 'smxi'. It is, according to the wiki "a general utility script that handles the standard system upkeep for Debian Sid (and Sid based, distros like sidux), Debian Testing, and Debian Stable - kernel installs, dist-upgrade/upgrade, package installs, cleanup, and graphics install."

    It may be a bit overwhelming for new Linux users but for those with some familiarity with Linux, it can be a very powerful tool and a big help.

    • Michael Mason
      August 4, 2016 at 4:16 am

      So would you like me to create a tutorial on smxi? From your comments below, it seems as if you want me to teach you how to point and click in a GUI, not teach you how to maintain an unstable branch of Linux.

      • fcd76218
        August 4, 2016 at 12:49 pm

        "So would you like me to create a tutorial on smxi?"
        No. I just mentioned smxi as another tool Debian users can employ to manage their software. Besides, if you take a look at smxi, you will see that the script is very well documented. Also h2 has written a tutorial that anybody can follow.

        BTW - smxi was originally developed for the unstable branch but it works on ALL flavors of Debian-based distros, not just the unstable branch.

  5. mango
    August 3, 2016 at 10:16 pm

    congratulations, I think you've just overwhelemed "new linux users" with too much jargon that will be stared at in bafflement and probably only frighten away potential new users..

    • Michael Mason
      August 3, 2016 at 11:31 pm

      5 basic commands for whichever distro they choose is too much jargon? I would think having as much information as possible when choosing a distro (especially when the only major difference between distros is package management) would make that choice easier... I mean, Apt is nice, but if I knew about Zypper before trying Debian, I probably would have tried OpenSUSE instead.

      • fcd76218
        August 3, 2016 at 11:55 pm

        "5 basic commands for whichever distro they choose is too much jargon? "
        If it was only 5 basic commands it wouldn't be so overwhelming. But most MUO Linux articles are about some command or another. I cannot remember the last MUO article that showed how to do something using GUI. MUO and other Linux sites are sending a confusing message to those who might want to switch from Windows to Linux. On the one hand the sites try very hard to convince them that Linux is user friendly but on the other hand the same sites publish articles that emphasize the use of CLI. White man speaks with forked tongue.

        • Michael Mason
          August 4, 2016 at 3:52 am

          I didn't say there are only 5 basic commands from a terminal, or for the entire package management system. I gave 5 basic commands that a potential Linux user can look at and decide which package manager, and distro based on said package manager, is easier for them.

          There is nothing confusing about what is shown, and a user might never need to use CLI. But having the knowledge to perform basic tasks is better than not having that knowledge if the need ever arises, right?

      • mango
        August 4, 2016 at 5:04 am

        Those 5 basic commands still require a certain level of understanding that is unlikely to be present with Linux Newbees.. "Much of what you've written won'tl make much sense to someone new to Linux.. Your article will clearly be useful for some, but the target audience is clearly not those who are "new to linux"..

        • fcd76218
          August 4, 2016 at 12:42 pm

          Apparently Michael has forgotten his trials and tribulations of learning Linux. He sounds like one of those Linuxers who hang out at slashdot or on the Arch forums and won't talk to anybody who is not fluent in CLI. :-)

        • Michael Mason
          August 4, 2016 at 2:19 pm

          It sounds like you forgot what Linux is all about: Learning about and using the actual operating system running on your computer.

        • Michael Mason
          August 4, 2016 at 2:15 pm

          New users need to decide on which distro to use, correct? There is more to that than looking at a pretty GUI. New users can most definitely benefit from learning how to install and remove software without the use of a GUI.

  6. Elvis
    August 3, 2016 at 10:15 pm

    I use Antergos (newbie arch distribution) and it uses Pamac as a friendly pacman GUI. It also can install packages from the aur through yaourt!

    Btw Michael, Zypper can install rpms from a URL like dnf. Dnf automatically removes unused dependencies when uninstalling packages. Aptitude/apt does too (not apt-get, zypper, or pacman do automatically).

    • Michael Mason
      August 3, 2016 at 11:28 pm

      I also use Antergos. Pamac is awesome. Ubuntu should take note and drop the Gnome Software Center and install Synaptic by default.

      While, yes, package managers do automatically remove dependencies, I have found, more often than not, quite a bit of leftover dependencies after removing software.

      Thanks for the heads up on Zypper. I couldn't find the command to install via URL, but I know OpenSUSE has weblink installs.

      • fcd76218
        August 3, 2016 at 11:38 pm

        "Ubuntu should take note and drop the Gnome Software Center and install Synaptic by default."
        It will be a cold day in hell before Canonical includes Synaptic by default. They are following Microsoft's example of having their own proprietary versions of programs. Why Mir instead of Wayland? Why Unity instead of Gnome or Gnome Shell? Why Ubuntu Software Center instead of Synaptic? IIRC, early versions of Ubuntu did install Synaptic by default.

        • Michael Mason
          August 4, 2016 at 3:55 am

          Yes they did, until they created their own Software Center.

      • Elvis
        August 4, 2016 at 3:29 am

        Zypper installs rpms from URLs exactly like dnf:

        https://www.suse.com/documentation/sles11/book_sle_admin/data/sec_zypper.html

        (It's near the beginning of the page... Like a few big paragraphs in)

        The one thing I miss from zypper is the "install-new-recommends" command. Useful when setting up a webcam/wacom tablet because it installs the drivers automagically after connecting the device and then running the command!

        Also it's sad seeing so much division here. This is what Linux is about: freedom of choice. There needs to be, per say "competition" otherwise not everyone will be happy. If ya don't like a project, don't use it. Why worry too much about the Linux world since you can't control it? Won't do good to your sanity ?. Unless you're a developer.... But even then, just do what you want, and others will fork your project if they want it different/usable somewhere else (I'm referring to the Wayland/Mir issue).

        About Synaptic... I would want a "filter" for it. Like a setting to enable only GUI or cli apps, like from Gnome Software. Then, if I wanted more advanced stuff, I could "revert" to the way Synaptic is now. Just my ¢2

        I have a question: why do makeuseof articles have a "tag" reference in the url even though it's an article? I mean, unless you guys make a new tag for every article...
        For example:
        http://www.makeuseof.com/tag/power-choice-power-package-management/
        ???

        • Michael Mason
          August 4, 2016 at 2:13 pm

          That's awesome, thanks for finding that.

          I agree. Way too much dividedness. We should be encouraging users to learn as much as they can about their OS, not just clicking around in windows because it's easy and they're used to it.

          I'm not sure about the tag thing, I'm definitely not the person to ask about that!

      • Elvis
        August 4, 2016 at 2:20 pm

        Zypper installs rpms from URLs exactly like dnf:

        https://www.suse.com/documentation/sles11/book_sle_admin/data/sec_zypper.html

        (It's near the beginning of the page... Like a few big paragraphs in)

        The one thing I miss from zypper is the "install-new-recommends" command. Useful when setting up a webcam/wacom tablet because it installs the drivers automagically after connecting the device and then running the command!

        Also it's sad seeing so much division here. This is what Linux is about: freedom of choice. There needs to be, per say "competition" otherwise not everyone will be happy. If ya don't like a project, don't use it. Why worry too much about the Linux world since you can't control it? Won't do good to your sanity ?. Unless you're a developer.... But even then, just do what you want, and others will fork your project if they want it different/usable somewhere else (I'm referring to the Wayland/Mir issue).

        About Synaptic... I would want a "filter" for it. Like a setting to enable only GUI or cli apps, like from Gnome Software. Then, if I wanted more advanced stuff, I could "revert" to the way Synaptic is now. Just my ¢2

        I have a question: why do makeuseof articles have a "tag" reference in the url even though it's an article? I mean, unless you guys make a new tag for every article...
        For example:
        http://www.makeuseof.com/tag/power-choice-power-package-management/
        ???

  7. fcd76218
    August 3, 2016 at 9:20 pm

    You are doing a great disservice to those readers that may be considering switching to Linux by perpetuating the myth that one has to be fluent in command line to do anything in Linux. Each one of the package managers you mention above has a readily available GUI front-end. Those GUI package managers are part of the default installs. They DO NOT need to be installed separately by the user. Ubuntu and its derivatives have more than one GUI package manager available.

    The only exception may be Arch. The Arch crowd believes that the way to Linux heaven leads through command line.

    • Michael Mason
      August 3, 2016 at 11:25 pm

      I disagree. Take, for instance, the Gnome Software Center included in Ubuntu 16.04. VERY limited selection of software. To get access to the full software repos through a GUI, you have to install Synaptic, which must be installed via Apt.

      Or what about hardware drivers if you're on a distro without a driver manager as found in Ubuntu?

      I think it's a disservice to Linux users to not know basic commands to install software and limiting them to what's found in the GUI package manager.

      • fcd76218
        August 4, 2016 at 12:14 am

        "I disagree. "
        That is your privilege but aren't you forgetting that many users who want to switch from Windows to Linux, have very little or no experience with command line? Yes, I know, Windows has a command line, too. But how often does the apocryphal 'average user' use CLI? Most of the switchers need to be shown something that is somewhat familiar to them, i.e. a GUI way of doing things. They can always learn CLI after they get comfortable with Linux. I am not suggesting that MUO abandon articles about command line altogether. I'm just suggesting that more articles about GUI might be as helpful as the CLI articles. Why not conduct a poll? MUO has polls for everything else.

        "Take, for instance, the Gnome Software Center included in Ubuntu 16.04. "
        I'd rather not. The tools for updating software in the Ubuntu family of distros is why I gave up on it long time ago. There used to be Ubuntu Software Manager and Ubuntu Update Manager and another program that only updated the system files. Taken individually or together they weren't worth a damn in comparison to Synaptic. But they did have very pretty interfaces.

        • Michael Mason
          August 4, 2016 at 4:06 am

          Nothing is stopping you from creating a tutorial on how to point and click within a GUI. I'd like to think my readers enjoy learning about their operating system and what makes it different from Windows, Mac, or other Linux distros.

          I'm not sure why you're so negative. You agree Synaptic is better than the Ubuntu or Gnome Software Centers, but don't want me to teach my readers how to install software not listed in the Ubuntu or Gnome Software Centers, like Synaptic?

        • fcd76218
          August 4, 2016 at 12:21 pm

          "Nothing is stopping you from creating a tutorial on how to point and click within a GUI."
          Now you're being silly. I am not talking about teaching readers how to point & click in a GUI. I am talking about telling the readers about, in this case, what GUI package managers are out there, available for use. Just like you wrote about the command line package managers.

    • Jaden Peterson
      August 4, 2016 at 1:11 am

      Dude you obviously have no experience. You can do sooooo much more with the command line. I'm not saying they have to learn it right away, but it definitely worth reading. If it weren't for those package managers, you little front-ends wouldn't be there. Me, and most people I know do most of their package-managing on the cli. It's easier once you get used to it in fact.

      • fcd76218
        August 4, 2016 at 12:32 pm

        Dude, you obviously missed my point. I never denied that CLI is a more powerful and versatile way of managing a Linux system. All I am saying (which is pretty much what you said above) is that just as you would not try to teach a 4th grader quadratic equations, you should not try to teach a Linux newbie pacman or portage. Once the newbie gets a little familiar with Linux, then (s)he'll start learning CLI on her/his own.

        • Michael Mason
          August 4, 2016 at 2:21 pm

          And you're missing what I'm saying. Knowledge of basic commands is better than no knowledge of basic commands.

        • 01101001b
          August 4, 2016 at 4:30 pm

          You're such a troll. I'm a new linux user and I've no problem at all with this article. It's a great article. Stop making fuss for no reason. And stop believing that every wind*ws user is as stupid as you.

        • Michael Mason
          August 4, 2016 at 5:27 pm

          What would you like to see more of in the Linux section? Anything you might want explained?

Leave a Reply

Your email address will not be published. Required fields are marked *