vicigeeksimple guides
Browse
All guides

Running your system · Start here · foundations

Linux packages: apt, zypper and safe updates

Detect which package manager a host actually has, then inspect Debian/Ubuntu and openSUSE packages safely before installing telephony software.

Reader setup

Before you start

  1. Terminal basics
  2. A disposable VM
  3. Know whether it is Debian/Ubuntu or openSUSE
Expected result
You can detect which package manager a host actually has, then inspect package information on that tool without starting a system-wide upgrade.
Before making changes
Do not mix repositories or run a distribution upgrade on a VICIdial/ViciBox host as a learning exercise.

Build a practice lab

Stage 1 of 4: Linux and network basics

Lesson 4 of 7 · Step 4 of 21

01 / 05

A package manager tracks software

A package bundles software together with metadata and a list of dependencies, so installing one thing correctly pulls in everything it needs. A repository is a configured, trusted source of packages. Let the package manager resolve dependencies for you instead of downloading an RPM or DEB file from a search result and installing it by hand — that shortcut is exactly how conflicting library versions and half-broken systems get created.

Two package managers matter for this curriculum: apt, used by Debian and Ubuntu, and zypper, used by openSUSE — the family ViciBox is built on. openSUSE also offers a graphical front end called YaST, which calls the same underlying tools. Stock ViciBox is its own maintained appliance, not a generic openSUSE install, so a package change that is safe on a plain openSUSE lab is not automatically a supported ViciBox modification; treat the two as related but separate skills.

Trace path · read left to right
01Repository02Package manager03Installed software

02 / 05

Detect before you assume

Never guess which package manager a host runs from its hostname, its purpose, or a habit from your last job. `/etc/os-release` names the distribution in a few standard, machine-readable lines, and `command -v` reports whether a given program exists on the current PATH (the list of directories your shell searches, in order, whenever you type a program's name without a full path to it) without running it — both are read-only checks you can run on any unfamiliar host in seconds, before you type a single package command.

Recording the release name and version is the first fact worth writing in any change ticket, because it determines which manual you should be reading and which package names are even valid; a package called openssh on one distribution can be called openssh-server or openssh-clients on another, and guessing wrong wastes time on both sides of a support conversation.

This matters more, not less, once VICIdial is involved. A forum post or an old blog written for a Debian-based install can name packages, paths and commands that simply do not exist under those names on the openSUSE-based ViciBox this curriculum's lab stage uses, and running its apt commands there will only teach you that apt itself is missing.

03 / 05

Guided sample: identify the platform

This sample answers two questions at once: what distribution is this, and which package manager does it actually have installed? `command -v apt` and `command -v zypper` each print a path if the tool exists, and print nothing and exit with a non-zero status if it does not — on almost every real host, exactly one of the two will report a path.

Running both lookups instead of assuming from the first one costs nothing and catches the rare host that genuinely has neither, or that has both because someone installed compatibility tooling — a case worth a question to the host's owner rather than a guess about which one actually manages the system's real packages.

Before you use it
All three commands only read; nothing here changes the system.
Identify your distribution
cat /etc/os-releasecommand -v aptcommand -v zypper
Evidence · ViciBox 12 demo capture

Captured demo response · 2026-09-23 21:34 UTC. Any filtering, hidden values or test-only data are identified in the capture label. Select Replay transcript to read the recorded output.

Command output line: cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.6"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.6"
PRETTY_NAME="openSUSE Leap 15.6"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.6"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
LOGO="distributor-logo-Leap"
Command output line: command -v apt
(no output)
Command output line: command -v zypper
/usr/bin/zypper
Success looks like
You see distribution details from /etc/os-release, and a path from whichever of apt or zypper is actually installed.
Stop if
Stop if the distribution is unfamiliar, both tools appear, or neither tool appears. Ask the administrator which package manager controls the host before continuing.

04 / 05

Guided sample: branch on what you detected, then inspect only

Now use what the previous sample told you, rather than running a command that only works on one family and prints a confusing "not found" error on the other. The script below checks for zypper first, since ViciBox and every other openSUSE-family host in this curriculum reports it, and falls back to apt-cache only if zypper is absent. Either branch only inspects; neither installs, removes nor upgrades anything.

`zypper info` and `apt-cache policy` both report a package's available and installed versions without asking for confirmation. If either tool ever does prompt you to confirm a transaction, stop — that means you typed an installation command by mistake, not an inspection one.

The captured zypper --no-refresh result uses cached metadata, which the capture shows as expired. It cannot establish that packages are currently up to date. Ask the host owner to verify repository health and refresh metadata during an approved change window before making that conclusion.

Before you use it
This runs exactly one branch, matching the tool the previous sample found; it only inspects.
Inspect, do not install
if command -v zypper >/dev/null 2>&1; then  zypper --no-refresh info opensshelif command -v apt-cache >/dev/null 2>&1; then  apt-cache policy openssh-serverfi
Evidence · ViciBox 12 demo capture

Captured demo response · 2026-09-24 21:56 UTC. Any filtering, hidden values or test-only data are identified in the capture label. Select Replay transcript to read the recorded output.

Command output line: if command -v zypper >/dev/null 2>&1; then zypper --no-refresh info openssh elif command -v apt-cache >/dev/null 2>&1; then apt-cache policy openssh-server fi
Loading repository data...
Warning: Repository 'openSUSE-SLE-15.6-Backports' metadata expired since 2026-03-11 13:53:14 EDT.
Warning: Repository 'Update repository of openSUSE Backports' metadata expired since 2026-03-11 13:53:14 EDT.
Warning: Repository metadata expired: Check if 'autorefresh' is turned on (zypper lr), otherwise
manually refresh the repository (zypper ref). If this does not solve the issue, it could be that
you are using a broken mirror or the server has actually discontinued to support the repository.
Reading installed packages...
Information for package openssh:
--------------------------------
Repository : openSUSE-SLE-15.6-Update
Name : openssh
Version : 9.6p1-150600.6.34.1
Arch : x86_64
Vendor : SUSE LLC <https://www.suse.com/>
Installed Size : 0 B
Installed : Yes
Status : up-to-date
Source package : openssh-9.6p1-150600.6.34.1.src
Upstream URL : https://www.openssh.com/
Summary : Secure Shell Client and Server (Remote Login Program)
Description :
SSH (Secure Shell) is a program for logging into and executing commands
on a remote machine. It replaces rsh (rlogin and rsh) and
provides secure encrypted communication between two untrusted
hosts over an insecure network.
xorg-x11 (X Window System) connections and arbitrary TCP/IP ports can
also be forwarded over the secure channel.
This is a dummy package that pulls in both the client and server
components.
Success looks like
You see one package's version and repository metadata, from whichever branch matched your host.
Stop if
Stop if the tool proposes a transaction or asks for confirmation; an inspection command should never do that.

05 / 05

Update plans need a change window

Everything above is inspection. Actually installing or upgrading a package is a different act entirely, and on a host running Asterisk, a database or a web server, it deserves a compatibility check, a rollback plan and a maintenance window — not a habit carried over from a personal laptop where an unplanned reboot costs nothing.

Treat any upgrade on a ViciBox host as a planned change. The historical ViciBox 7-era kernel note in this library is an unverified legacy reference, not a current upgrade procedure; it walks through repository checks, free space in /boot and a reboot — exactly the preparation an ad hoc `zypper update` skips. That belongs in a change window, never on a host others depend on.

  • I can name my host's distribution and its package manager without guessing.
  • I ran only the branch that matched what I detected.
  • I know that any prompt asking me to confirm a transaction means I have left inspection and entered installation.

Checks and sources

What was checked

  • Both samples in this lesson only read package metadata: `cat`, `command -v`, `zypper info` and `apt-cache policy` never install, remove or upgrade a package.

Primary references

Sources

  1. APT user guideDebian Project · accessed September 23, 2026
  2. Managing software with command line toolsopenSUSE · accessed September 23, 2026

Follow without guesswork

Get the next article

RSS is live now. Email delivery below is an explicit local preview and sends nothing.Open the RSS feed
Email preview only. The address stays in this browser and is never transmitted.