Installing and Removing Packages

LinuxIntermediate
Practice Now

Introduction

Welcome to this Linux package management challenge! As an aspiring system administrator, you'll need to master the art of managing software packages on Linux systems. In this challenge, you'll demonstrate your ability to update the system and manage packages using Ubuntu's package management tool, apt.

System Update and Package Management

In this step, you'll update your system's package list, upgrade installed packages, and then install and remove specific software packages.

Tasks

  1. Update the list of available packages.
  2. Upgrade all installed packages to their latest versions.
  3. Install the cowsay command line tool using the apt package manager.
  4. Remove the nginx web server package using the apt package manager.

Requirements

  • Execute all commands as the labex user with sudo privileges.
  • Use the apt package management tool for all operations.
  • Perform all tasks in the default working directory /home/labex/project.

Example

After completing all tasks, you should be able to verify the system state as follows:

Verifying that cowsay is installed:

$ dpkg -s cowsay | grep Status
Status: install ok installed

Confirming that nginx is removed:

$ dpkg -s nginx | grep Status
dpkg-query: package 'nginx' is not installed and no information is available

Summary

In this challenge, you've practiced essential Linux package management skills. You've learned how to update your system's package list, upgrade installed packages, and install and remove specific software. These fundamental skills are crucial for maintaining and managing Linux systems effectively. As you continue your journey in system administration, remember that mastering package management is key to keeping your systems up-to-date, secure, and tailored to your needs.

✨ Check Solution and Practice