Mastering Package Installation on Linux: Beyond Apt and Yum
Forget the one-size-fits-all approach; exploring lesser-known package managers and manual installation methods reveals the true flexibility and power of Linux systems. Whether you’re a developer, sysadmin, or a passionate Linux user, understanding how to install software beyond the popular apt
(Debian/Ubuntu) and yum
(CentOS/RHEL) commands can significantly boost your productivity and system stability.
In this post, we’ll dive into alternative package managers and manual installation techniques that work across various Linux flavors. By the end, you’ll feel confident handling software installs regardless of your distro or setup.
Why Go Beyond Apt and Yum?
Typically, when we need to install a program on Linux, we reach for:
sudo apt install package-name
on Debian-based distrossudo yum install package-name
ordnf
on Red Hat-based systems
But what if:
- Your distro doesn’t use apt or yum? (e.g., Arch Linux uses
pacman
) - You want more control over the software version or build options
- The package isn't available in standard repos
- You want to install from source or use containerized package formats
Exploring other methods empowers you to work efficiently regardless of environment.
Alternative Package Managers You Should Know
1. Pacman — The Arch Linux Powerhouse
If you’re using Arch or derivatives like Manjaro, pacman
is your go-to.
Installing a package
sudo pacman -S package-name
Example
sudo pacman -S neofetch
Pacman combines binary package management with build capabilities via AUR helpers (like yay
)—more on that soon.
2. Zypper — OpenSUSE’s Robust Tool
OpenSUSE uses zypper
, which offers advanced dependency resolution.
sudo zypper install package-name
Example:
sudo zypper install vim
Zypper can also add repos, patch the system, or rollback changes — handy when managing complex setups.
3. Snap — Universal Linux Packages From Canonical
Snap packages bundle dependencies neatly and run in confined sandboxes. They work across many distros without worrying about underlying libraries.
Install snapd if not installed
sudo apt update && sudo apt install snapd # Ubuntu/Debian example
Install a snap package
sudo snap install vlc
Snaps auto-update and separate applications cleanly from your base system.
4. Flatpak — Another Universal Format
Flatpak is similar to Snap but often preferred in Fedora, GNOME-focused distros, and more.
Install Flatpak
sudo apt install flatpak # Debian/Ubuntu example
Add Flathub repo
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Install a flatpak app
flatpak install flathub org.gimp.GIMP
Run it via:
flatpak run org.gimp.GIMP
Manual Install: Compiling From Source
Sometimes precompiled packages aren’t available or are outdated. Compiling from source can be a rewarding option.
Typical steps:
-
Install build dependencies
On Debian/Ubuntu:
sudo apt update && sudo apt install build-essential checkinstall libssl-dev
-
Download source code
Usually from GitHub or official websites:
git clone https://github.com/example/project.git cd project/
-
Configure the build
Many projects use
./configure
; others might use CMake:./configure --prefix=/usr/local
-
Build & Install
make # Compile the source code sudo make install # Install binaries and resources system-wide
-
Verify installation
Check the program version or run it directly:
project-name --version
Note: Using tools like checkinstall
instead of make install
creates a native .deb
or .rpm
package for easier uninstall later.
Bonus: Using AppImage for Portable Software
AppImage is an easy way to run applications without installing anything system-wide.
Steps:
- Download an AppImage file from the official site.
- Make it executable:
chmod +x MyApp.AppImage
- Run it directly:
./MyApp.AppImage
No root permissions needed, no system pollution — great for testing!
Summary Table of Package Managers & Methods
Method | Example Command | Use Case | Distribution Coverage |
---|---|---|---|
Apt | sudo apt install <pkg> | Popular Debian/Ubuntu installs | Ubuntu, Debian |
Yum/DNF | sudo yum install <pkg> | RHEL-family distributions | CentOS, Fedora (later replaced by DNF) |
Pacman | sudo pacman -S <pkg> | Arch Linux ecosystem | Arch Linux |
Zypper | sudo zypper install <pkg> | OpenSUSE users | OpenSUSE |
Snap | sudo snap install <pkg> | Universal containerized apps | Cross-distro support |
Flatpak | flatpak install flathub <app-id> | Universal sandboxed apps | Cross-distro support |
Manual Source Build | Compile via: configure → make → make install | Customized builds & cutting-edge versions | Any distro w/ build tools |
AppImage | Run .AppImage directly | Portable apps | Any distro w/ FUSE support |
Final Tips for Smooth Package Installing Experience
- Always read official documentation when possible.
- Use your distro’s native manager first to keep things clean.
- When compiling from source, keep track of installed files.
- Use sandboxed formats like Snap or Flatpak to avoid dependency hell.
- Update your repos regularly to get latest security fixes.
Mastering these tools opens doors to experimenting with fewer boundaries — truly harnessing the flexibility of Linux!
Happy installing! 🚀
Did you find this guide helpful? Feel free to share your experiences installing tricky packages below!