Package Manager Cheat Sheet

Pick a Linux or BSD distro from the dropdown and copy the matching command — refresh, install, remove, or the update-and-reboot one-liner.

Package manager cheat sheet

Pick a distro. Copy the matching command — refresh, install, remove, or an update-and-reboot one-liner. Commands update live.

openSUSE Leap uses zypper. zypper up stays on this release; zypper dup is for Tumbleweed and Leap version jumps.

Update and reboot
sudo zypper refresh && sudo zypper up -y && sudo reboot
Refresh repositories
sudo zypper refresh
Upgrade packages
sudo zypper up
Distro upgrade
sudo zypper dup
Install
sudo zypper in package
Remove
sudo zypper rm package
Search
Package info
sudo zypper info package
List installed
sudo zypper se -i
Clean / autoremove
sudo zypper clean

Runs in your browser. Nothing is uploaded.

Need the apt, dnf, zypper, pacman, apk, or pkg equivalent without flipping between man pages? Pick a distro from the dropdown, optionally type a package name, and copy a command. This package manager cheat sheet is part of the Linux tools on TechOpt.io. The update-and-reboot line is the same family of one-liners as the update and reboot Linux/BSD post. To run that line on a schedule, use the cron expression builder.

How this package manager cheat sheet maps distros

Each distro maps to the package manager it actually ships. openSUSE Leap and SLES use zypper up. openSUSE Tumbleweed and Slowroll use zypper dup. Debian, Ubuntu, Mint, and Proxmox share apt(8). Fedora, Rocky, and AlmaLinux share dnf. Arch and Manjaro share pacman. Alpine uses apk, Void uses xbps, NixOS uses nixos-rebuild, and OpenBSD uses pkg_add. FreeBSD’s pkg is here because the one-liner post covers BSD as well as Linux.

The package name field is optional. Leave it blank and install, remove, search, and info use the placeholder package. Prefix with sudo when you are not root; the toggle puts sudo on every segment of a chained command. Reboot only changes the featured one-liner, and is skipped on Termux where there is no host reboot.

Update and reboot one-liners

The first copy box is an unattended refresh, upgrade, and reboot. Flags match the post: -y or --noconfirm so prompts do not block, and sudo on each segment when that toggle is on. FreeBSD and OpenBSD restart with shutdown -r now instead of reboot. Turn reboot off if you only want the update chain.

Share a distro with ?distro=ubuntu, ?distro=opensuse-tumbleweed, or ?distro=alpine. Older ?pm=apt (and zypper, dnf, pacman, pkg) links still land on Debian, Leap, Fedora, Arch, or FreeBSD. Add &name=nginx to pre-fill the package field.

zypper up vs zypper dup

zypper up (also zypper update) upgrades packages that fit the current openSUSE Leap repositories. It will not change the distribution version. zypper dup (dist-upgrade) is Tumbleweed’s daily path and the Leap command used when moving to a new release. Pick openSUSE Leap in the dropdown for up, openSUSE Tumbleweed for dup.

apt upgrade vs apt full-upgrade

apt upgrade installs newer versions of packages already on the system and refuses to remove anything to satisfy dependencies. apt full-upgrade (the old dist-upgrade) may remove packages when that is required to upgrade others. The one-liner uses apt upgrade -y plus autoremove, same as the blog post. Use Distro upgrade in the sheet when you want full-upgrade.

FreeBSD reboot

FreeBSD has a reboot command, but shutdown -r now is the supported way to run rc shutdown scripts and unmount filesystems before restarting. The one-liner keeps that form. The rest of the sheet uses pkg update, pkg upgrade, pkg install, and pkg delete.

FAQ

How do I update and reboot in one line?

Pick your distro above and copy the Update and reboot line. Leap is zypper refresh && zypper up -y && reboot. Tumbleweed uses dup instead of up. Debian/Ubuntu chains apt update, apt upgrade -y, and apt autoremove -y. Fedora is dnf update -y && reboot. Arch is pacman -Syu –noconfirm && reboot. FreeBSD is pkg update && pkg upgrade -y && shutdown -r now. Turn on sudo to prefix every segment.

How do distros map to package managers?

Each distro in the dropdown is wired to the manager it actually ships. Ubuntu, Mint, and Proxmox use apt. Fedora, Rocky, and AlmaLinux use dnf. openSUSE Leap uses zypper up; Tumbleweed and Slowroll use zypper dup. Alpine uses apk, Void uses xbps, NixOS uses nixos-rebuild, and OpenBSD uses pkg_add. Derivatives share the parent’s commands.

What is the difference between zypper up and zypper dup?

zypper up (or zypper update) upgrades packages within the current Leap release and will not change the distribution version. zypper dup (dist-upgrade) is the Tumbleweed daily path and the Leap tool for moving to a new release. This picker uses up for Leap and dup for Tumbleweed.

What is the difference between apt upgrade and apt full-upgrade?

apt upgrade installs newer versions of packages already on the system and will not remove packages to resolve dependencies. apt full-upgrade (the old dist-upgrade) may remove packages if that is required to upgrade others. The one-liner uses apt upgrade -y plus autoremove, matching the TechOpt post.

Why does FreeBSD use shutdown -r now instead of reboot?

FreeBSD’s reboot exists, but shutdown -r now is the supported way to run rc shutdown scripts and unmount filesystems before restarting. The one-liner uses that form.

Should I add sudo?

Yes if you are not root. Leave the sudo toggle on and every segment of the copied command is prefixed, for example sudo zypper refresh && sudo zypper up -y && sudo reboot. Turn it off when you are already root.

Is it safe to run unattended upgrades on Tumbleweed or Arch?

Rolling releases can ship breaking changes. Review zypper dup or pacman -Syu output before you automate them, and keep backups. The -y / –noconfirm flags skip prompts; that is convenient on Leap, Debian, and Fedora, and riskier on a rolling system.

Does this package manager cheat sheet upload my commands?

No. It runs entirely in your browser. Distro choice and package names never leave your machine.

Looking for more Linux how-tos? Browse the Linux guides or the rest of the tools.