← Back to DevBytes

Manjaro Package Management: APT, DNF, Pacman Guide

Understanding Package Management on Manjaro

Manjaro Linux is an Arch-based distribution that ships with Pacman as its native package manager. While APT (Debian/Ubuntu) and DNF (Fedora/RHEL) are not native to Manjaro, developers working in multi-distribution environments, using containers, or maintaining cross-platform applications often need to understand all three. This guide covers each package manager in the context of Manjaro — from native Pacman usage to running APT and DNF inside isolated environments like Distrobox, Docker, or chroot setups.

Pacman: The Native Package Manager

🚀 Deploy your AI agent in 10 minutes

Managed Hermes hosting. Zero DevOps. 100M tokens/mo included.

Try it free →

What is Pacman?

Pacman is the Arch Linux package manager, inherited by Manjaro. It manages software packages from the official Manjaro repositories, handles dependencies, and performs system-wide updates. Pacman uses compressed .pkg.tar.zst packages and works with a rolling-release model, meaning packages are continuously updated rather than tied to fixed distribution versions.

Why Pacman Matters on Manjaro

Pacman is the backbone of Manjaro's package ecosystem. It gives you direct access to the Arch User Repository (AUR), bleeding-edge software, and a minimalist yet powerful package management workflow. Understanding Pacman is essential for maintaining a stable, up-to-date Manjaro system.

How to Use Pacman

1. Update the system and package database:

# Full system upgrade (sync database, upgrade packages)
sudo pacman -Syu

# Sync package database only
sudo pacman -Sy

# Upgrade packages without syncing database
sudo pacman -Su

2. Installing packages:

# Install a single package
sudo pacman -S firefox

# Install multiple packages at once
sudo pacman -S vim git curl htop

# Install from a specific repository
sudo pacman -S extra/neovim

# Install package group
sudo pacman -S base-devel

3. Removing packages:

# Remove a package, keep dependencies
sudo pacman -R firefox

# Remove package and its unrequired dependencies
sudo pacman -Rns firefox

# Remove package, dependencies, and configuration files
sudo pacman -Rns firefox

4. Searching and querying packages:

# Search for a package by name or description
pacman -Ss python

# Show detailed package information
pacman -Si python

# List installed packages
pacman -Q

# Show which package owns a specific file
pacman -Qo /usr/bin/python

# List all files installed by a package
pacman -Ql python

# Check for packages that are not in the repositories (foreign/aur packages)
pacman -Qm

5. Cleaning up the package cache:

# Remove uninstalled packages from cache, keep 3 versions
sudo paccache -r

# Remove all cached packages except installed ones
sudo pacman -Sc

# Aggressively clean cache (removes ALL cached versions)
sudo pacman -Scc

6. Working with the AUR using an AUR helper (yay):

# Install yay if not already present
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -si

# Search AUR packages
yay -Ss visual-studio-code

# Install from AUR
yay -S google-chrome

# Update all packages including AUR
yay -Syu

Pacman Best Practices

APT on Manjaro: Containerized and Compatibility Usage

What is APT?

APT (Advanced Package Tool) is the package manager for Debian, Ubuntu, and their derivatives. It manages .deb packages and relies on dpkg for low-level package operations. APT handles repository management, dependency resolution, and system upgrades within the Debian ecosystem.

Why APT Matters on Manjaro

Manjaro does not use APT natively. However, developers often need APT when:

How to Use APT on Manjaro

Option 1: Using Distrobox (Recommended)

Distrobox creates a containerized environment that integrates seamlessly with your host system, giving you access to APT without dual-booting.

# Install Distrobox via AUR
yay -S distrobox

# Create an Ubuntu container
distrobox create --name ubuntu-dev --image ubuntu:22.04

# Enter the container
distrobox enter ubuntu-dev

# Inside the container, APT is fully functional
sudo apt update
sudo apt install build-essential git python3

Option 2: Using Docker/Podman containers

# Pull and run an Ubuntu container
docker run -it --name ubuntu-apt ubuntu:22.04 bash

# Inside the container
apt update && apt install curl wget vim

Option 3: Installing APT tools natively on Manjaro (Experimental)

There is an AUR package called apt (a parody compatibility script) and dpkg available. These are not full APT implementations and should only be used for educational purposes or extracting .deb files.

# Install dpkg and deb extraction tools
yay -S dpkg debtap

# Convert a .deb package to Arch format
debtap package.deb
sudo pacman -U package.pkg.tar.zst

APT Best Practices on Manjaro

DNF on Manjaro: Cross-Distribution Package Management

What is DNF?

DNF (Dandified YUM) is the package manager for Fedora, RHEL, CentOS Stream, and other RPM-based distributions. It manages .rpm packages using rpm as the low-level backend. DNF offers features like transaction history, rollback capabilities, and modular package streams.

Why DNF Matters on Manjaro

DNF is relevant to Manjaro users who:

How to Use DNF on Manjaro

Option 1: Distrobox with Fedora

# Create a Fedora container
distrobox create --name fedora-dev --image fedora:39

# Enter the container
distrobox enter fedora-dev

# Standard DNF operations inside the container
sudo dnf update
sudo dnf install gcc cmake nodejs

# Enable a DNF module (e.g., a specific Node.js version)
sudo dnf module enable nodejs:20
sudo dnf install nodejs

Option 2: Docker with RPM-based images

# Run a Rocky Linux container (RHEL-compatible)
docker run -it --name rocky-test rockylinux:9 bash

# Inside the container
dnf install epel-release
dnf install python3-pip nginx

Option 3: RPM extraction tools on Manjaro

# Install rpm tools for inspecting .rpm files
yay -S rpm-tools rpmextract

# Extract an RPM package contents
rpmextract package.rpm

# Query RPM metadata without installing
rpm -qp --info package.rpm
rpm -qp --list package.rpm

Common DNF commands reference:

# Update all packages
sudo dnf upgrade

# Install a package
sudo dnf install nginx

# Remove a package
sudo dnf remove nginx

# Search repositories
dnf search python

# Show package details
dnf info python

# List installed packages
dnf list installed

# View DNF transaction history
dnf history

# Rollback to previous transaction
sudo dnf history rollback 5

# Clean DNF cache
sudo dnf clean all

DNF Best Practices on Manjaro

Side-by-Side Command Comparison

When switching between environments, these quick-reference tables help you translate commands across package managers:

| Operation          | Pacman                     | APT                          | DNF                          |
|--------------------|----------------------------|------------------------------|------------------------------|
| Update DB          | pacman -Sy                 | apt update                   | dnf check-update             |
| System Upgrade     | pacman -Syu                | apt upgrade                  | dnf upgrade                  |
| Install Package    | pacman -S pkg              | apt install pkg              | dnf install pkg              |
| Remove Package     | pacman -R pkg              | apt remove pkg               | dnf remove pkg               |
| Search Packages    | pacman -Ss term            | apt search term              | dnf search term              |
| Package Info       | pacman -Si pkg             | apt show pkg                 | dnf info pkg                 |
| List Installed     | pacman -Q                  | apt list --installed         | dnf list installed           |
| Clean Cache        | pacman -Sc                 | apt clean                    | dnf clean all                |
| Orphan Removal     | pacman -Qdtq | pacman -Rs - | apt autoremove               | dnf autoremove               |

Conclusion

Manjaro's native package manager, Pacman, is a fast and powerful tool that forms the core of the distribution's rolling-release identity. While APT and DNF are not native to Manjaro, modern containerization tools like Distrobox and Docker make it trivial to run Debian, Ubuntu, Fedora, or RHEL environments directly on a Manjaro host. By mastering Pacman for system maintenance and understanding how to leverage APT and DNF within isolated environments, developers gain the flexibility to work across the entire Linux ecosystem without sacrificing the stability and performance of their Manjaro workstation. The key takeaway is simple: use Pacman for your system, use containers for everything else, and always keep your environments clean and well-documented.

🚀 Need a reliable AI agent for your project?

Deploy Hermes Agent in 10 minutes. Managed hosting, zero DevOps.

Get Started — $23.99/mo
← Back to all articles