Skip to content

Install and Update Linux Software: A Beginner Guide

Admin
October 19, 2026
12 min read
Beginner
💻 Target OS: Ubuntu 24.04+ / Debian 12+ / RHEL 9+

Before you begin

  • Applies to:Distribution packages on Ubuntu, Debian, RHEL 9, or Fedora. Arch is covered in an optional section.
  • Where to start:Use a Linux lab machine. Check /etc/os-release, then follow only the section for your distribution.
  • What you need:Have an internet connection, approved repositories, and an account allowed to use sudo.
Guide tools
Guide tools
0/0 Steps (0%)

A package is software prepared for your Linux distribution. A package manager downloads it from a repository, installs the files, and tracks updates and dependencies. You usually do not need to download an installer from a website.

You will find, install, test, update, and optionally remove one small program. Use an Ubuntu/Debian or RHEL 9/Fedora lab machine, an internet connection, and an account allowed to use sudo. This guide covers distribution packages; desktop app stores, Flatpak, and Snap use separate workflows.

Choose APT or DNF → Inspect its source → Read each prompt → Update or remove

Choose APT or DNF → Inspect its source → Read each prompt → Update or remove.

01

Identify Your Linux Distribution

Start Here

A distribution is a version of Linux packaged with its own software tools. cat displays a text file. Read PRETTY_NAME in this file to choose your package manager.

Terminal window
cat /etc/os-release
❯ What to expect
Example line on an Ubuntu machine:
PRETTY_NAME="Ubuntu 24.04.3 LTS"
Your release name and version may differ.
02

Refresh the List of Available Software

Choose Your Distribution

A repository is a software source. Refreshing its list lets your package manager see available versions; it does not upgrade installed applications. DNF calls this list metadata, and —refresh requests a fresh check. Stop if the refresh reports a repository or signature error.

Terminal window
sudo apt update
❯ What to expect
APT: repository download lines, followed by a package-list summary.
DNF: repository metadata progress and a cache summary.
There should be no failed repository or signature checks.
03

Find One Package and Inspect Its Source

Choose Your Distribution

We will use tree, a small tool that displays folders as a tree. search finds packages by name or description. Read the description before installing. APT policy shows the candidate version and repository URL; DNF info shows package information and its repository. Check whether the tool already exists with command -v tree; if it does, keep it installed during the optional removal step.

Terminal window
apt search tree
apt policy tree
command -v tree
❯ What to expect
Look for the package named tree and its approved repository.
command -v tree prints a path if installed, such as /usr/bin/tree.
If absent, command -v prints nothing and returns status 1; this is expected.
04

Install tree and Read the Confirmation Prompt

Choose Your Distribution

The package manager may propose supporting packages called dependencies. Read the complete list and download size. Confirm only if these changes fit your lab. APT normally accepts Y or n; DNF normally asks y/N. These commands deliberately leave the confirmation prompt enabled.

Terminal window
sudo apt install tree
❯ What to expect
The package manager proposes an installation or reports it is already installed.
After you approve, it downloads and installs the package.
Version numbers, dependencies, and prompt wording vary.
05

Check That the Program Works

Verify

—version displays the installed program version. tree -L 1 lists only one level of your home folder; -L limits the depth. $HOME means your home directory. Quotes keep a path together if it contains spaces.

Terminal window
tree --version
tree -L 1 "$HOME"
❯ What to expect
First: a tree version line.
Then: your home directory and its immediate visible files and folders.
06

Review and Apply Available Updates

Choose Your Distribution

First list available updates. Then, when you are ready to update this lab, run the upgrade command and review its proposal. APT list —upgradable and DNF list —upgrades list candidates; the following upgrade command installs updates after confirmation. This updates packages within the current release, rather than upgrading to a new Linux release.

Terminal window
apt list --upgradable
sudo apt upgrade
❯ What to expect
Either a list of newer package versions or a message that nothing needs updating.
Read any confirmation prompts and service or configuration notices.
07

Optionally Remove Only the Practice Package

Choose Your Distribution

Skip removal if tree was installed before this exercise or you want to keep it. Otherwise, request removal and read the proposed package list. Cancel if it includes anything you need. APT remove normally retains package configuration; purge also removes package-managed configuration and is not needed for this exercise.

Terminal window
sudo apt remove tree
❯ What to expect
A removal proposal naming tree and possibly unused dependencies.
After removal, command -v tree normally prints nothing if no other copy exists.
Optional: the same tasks on Arch Linux with Pacman

Arch uses a rolling release model. Start with a full system upgrade; read Arch news and its upgrade guidance first. -Syu refreshes repositories and upgrades the system together. Never use pacman -Sy followed by a package install to perform a partial upgrade.

Terminal window
sudo pacman -Syu
pacman -Ss '^tree$'
pacman -Si tree
sudo pacman -S --needed tree
tree --version

-Ss searches repositories, -Si displays package details, and --needed skips reinstalling an up-to-date package. To remove only the practice tool later, run sudo pacman -R tree and review the prompt. Stop if Pacman reports that other packages require it. Do not add dependency-override flags.

References and next steps

Comments