Mission 22 of 30
Ubuntu Package Management Safely
Discover whether software is installed before considering a system change.
Search and inspect packages while keeping installation optional so the course remains removable.
Practice inside
~/linux-practice. Check your setup before you begin.
Prerequisite: Disk Usage and Storage Info
.
What you’ll practice
- Search packages
- Inspect installed packages
- Recognize install/remove as system-changing
The mental model
- APT manages Ubuntu software.
- Ubuntu and Debian use apt; Fedora uses dnf, Arch uses pacman, and openSUSE uses zypper. File and shell commands in this course work across them, but package commands do not.
- Search/show/list are read-only.
- Install/remove/purge use sudo and affect the real system outside ~/linux-practice.
Try it in your terminal
Read-only package search
Read-only system viewSearches and inspects packages without installing anything.
Run from ~/linux-practice
apt search 'text editor' | head -20
apt show nano | head -20
apt list --installed | head -20 Detect your package manager
Read-only system viewChecks which common package-manager command is available without changing the system. Follow the APT examples only on Ubuntu, Debian, or their WSL distributions.
Run from anywhere
command -v apt || true
command -v dnf || true
command -v pacman || true
command -v zypper || true Inspect installed files
Read-only system viewUses dpkg to inspect installed package information.
Run from ~/linux-practice
dpkg -l | head -20
dpkg -l | grep -i bash
dpkg -L bash | head -20 Optional install/remove pattern
Optional adminThis changes the real Ubuntu system. It is optional and not part of the removable sandbox guarantee.
Run from advanced users only
sudo apt update
sudo apt install sl -y
sudo apt remove sl Put it into practice
- Use apt search file manager and apt show nautilus without installing anything.
Check your result
Package inspection succeeds without an admin change.
Common mistakes
- You install a package with `sudo apt install`, then delete ~/linux-practice thinking that undoes it. Package installation writes to system directories like /usr and /etc. Deleting your practice folder does not remove installed software.
- You type `sudo apt search` when `apt search` works fine. Read-only commands don't need sudo. Save sudo for commands that actually change the system — install, remove, update.
Check your understanding
Explain these in your own words. If you’re unsure, revisit the examples before moving on.
- Which APT actions are read-only?
- Why is package installation optional in this guide?
Your practice, your pace
Loading saved progress…