Signal9Signal9 — home
online
back to labs

Package Detective: Query, Install, Remove

EasyLinux Fundamentals15-20 min
The brief

On Ubuntu, almost every program arrives in a package, and dpkg keeps a record of each one: what's installed, which version, and which files it put where. You're logged in as 'student'. You can use sudo, but only for the package tools (dpkg, apt and apt-get). Asking questions about packages needs no sudo. Changing what's installed does.

This box has no internet, so the packages you need are already in ~/packages as .deb files.

1. ~/brief.txt names a command on this box. Find out which installed package put it there and save just the package name in ~/answers/owner.txt. The package name is not always the command's name.

2. ~/packages holds two versions of signal9-motd. Install the newer one, not whichever file comes first.

3. signal9-legacy-agent is installed but has been retired. Remove it.

dpkg -S <file> names the package that owns a file. dpkg-deb -I <file.deb> shows a package file's name and version before you install it. sudo dpkg -i <file.deb> installs a local package. sudo apt remove <name> removes one. dpkg -l <name> shows what's installed now.

What you'll do
  • Find which package owns a file with dpkg -S
  • Inspect .deb files before installing and install the right version with sudo
  • Remove a package cleanly and confirm it's gone with dpkg -l

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.