Installing and Updating Software
Use package managers to install new applications, keep existing software up-to-date, and perform system upgrades safely.
Installing and Updating Software is a free Linux Server Deployment & SSH Mastery lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Linux Server Deployment & SSH Mastery learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Software Management Essentials
Package managers are vital for managing software on Linux servers. They help you install, update, and remove applications easily and efficiently.
In this lesson, you'll learn how to use common package manager commands to keep your server's software up-to-date and secure.
APT: Updating Package Lists
Before installing or upgrading software on Debian-based systems (like Ubuntu), it's crucial to update your package lists. This tells your system about the latest available packages and their versions.
Use sudo apt update to refresh these lists from the repositories.
sudo apt updateAPT: Installing New Software
Once your package lists are updated, you can install new software. Let's install cowsay, a fun utility that makes a cow say a message!
The apt install command downloads and installs the specified package and its dependencies.
sudo apt install cowsay -y
cowsay "Hello CoddyKit!"APT: Upgrading Existing Software
After updating package lists, you can upgrade your installed software. This downloads and installs newer versions of packages that are already on your system.
sudo apt upgrade only upgrades existing packages; it won't remove or install new ones unless strictly necessary for dependency resolution.
sudo apt upgrade -yYUM/DNF: Updating & Installing
For Red Hat-based systems (like CentOS, Fedora), YUM or DNF are the package managers. DNF is the newer, improved version of YUM.
Unlike APT's two-step `update` then `upgrade`, sudo dnf update (or yum update) typically performs both actions: it checks for updates and then upgrades all installed packages to their latest versions.
sudo dnf update -yYUM/DNF: Installing New Software
Installing software with DNF/YUM is straightforward, similar to APT. Let's install figlet, which creates large character art from ordinary text.
The dnf install (or yum install) command fetches and installs the specified package along with any required dependencies.
sudo dnf install figlet -y
figlet CoddyKitRemoving Software: APT
When you no longer need a program, you can remove it. For APT, there are two main commands:
apt remove: Uninstalls the package, but may leave configuration files behind.apt purge: Uninstalls the package AND removes its configuration files. This is useful for a clean removal.
sudo apt remove cowsay -y
sudo apt purge cowsay -yRemoving Software: YUM/DNF
Removing software with DNF/YUM is simple. The dnf remove (or yum remove) command uninstalls the specified package.
By default, DNF/YUM aims to clean up configuration files more thoroughly than apt remove, but specific package behavior can vary.
sudo dnf remove figlet -yMajor System Upgrades
Sometimes you need to upgrade your entire operating system to a new major version (e.g., Ubuntu 20.04 to 22.04). This is different from a regular upgrade.
- APT: Use
sudo apt dist-upgrade(afterupdate) and oftensudo do-release-upgradefor major version bumps. - YUM/DNF: Use
sudo dnf system-upgrade.
These commands are powerful and should be used with caution, ideally after backing up your data, as they can involve significant system changes.
Quick Check
Which of the following statements about package management commands are true?
Recap: Keep Your Server Fresh
You've learned the core commands for managing software on Linux servers!
- APT (Debian/Ubuntu):
update(lists),install(new),upgrade(existing),remove/purge(uninstall). - YUM/DNF (Red Hat/CentOS/Fedora):
update(lists & upgrade),install(new),remove(uninstall).
Regularly updating your server's software is a critical practice for security and performance. Keep practicing these commands to master server maintenance!
Frequently asked questions
Is the “Installing and Updating Software” lesson free?
Yes — the full text of “Installing and Updating Software” is free to read here on the web, and the Linux Server Deployment & SSH Mastery course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Linux Server Deployment & SSH Mastery course, upgrade to CoddyKit PRO.
What will I learn in “Installing and Updating Software”?
Use package managers to install new applications, keep existing software up-to-date, and perform system upgrades safely. You practise Linux Server Deployment & SSH Mastery with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Linux Server Deployment & SSH Mastery?
No prior experience is required. Linux Server Deployment & SSH Mastery on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Installing and Updating Software” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Linux Server Deployment & SSH Mastery lesson?
Yes. Every Linux Server Deployment & SSH Mastery lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- APT and YUM Package Managers
- Installing and Updating Software
- Managing Software Repositories
- Building from Source and Using Snap/Flatpak