Overview
This lecture covers the use of the apt package manager in Ubuntu, including installing, removing, and updating software packages, as well as managing repositories.
Apt Package Manager Basics
- apt (Advanced Package Tool) is used in Ubuntu to manage software packages easily.
- It extends the functionality of dpkg by handling dependencies and simplifying installation and removal processes.
- apt can automatically install dependencies required for packages.
Installing and Removing Packages
- Use
sudo apt install <package> to install software; apt fetches and installs required dependencies.
- apt gives a summary of package changes after installation (e.g., number of packages installed or upgraded).
- Remove software with
sudo apt remove <package>; apt also removes unneeded dependencies.
Package Repositories
- Repositories are central servers storing software packages for download and installation.
- Package repositories eliminate the need to manually search for software online.
- In Ubuntu, repository sources are listed in
/etc/apt/sources.list.
- Ubuntu includes default repositories for base OS packages and essential tools.
Personal Package Archives (PPAs)
- PPAs are special repositories hosted on Launchpad servers, maintained by developers.
- Add PPAs like regular repositories, but use caution—PPA content may be less vetted and potentially unsafe.
Updating Software and Repositories
- Run
apt update to refresh the package list from repositories—this does not install or upgrade software.
- Run
apt upgrade to install new versions of outdated packages.
- It's recommended to run
apt update and apt upgrade before installing new software for the latest versions.
Apt Command Help
- Use
apt help to see available apt commands and options, such as searching or listing packages.
Key Terms & Definitions
- apt — Advanced Package Tool, Ubuntu’s package manager for installing, removing, and managing software.
- Repository — Central server storing software packages accessible by apt.
- PPA (Personal Package Archive) — User-maintained repository hosted on Launchpad, often for specific or non-standard software.
- /etc/apt/sources.list — File listing repository sources used by apt.
Action Items / Next Steps
- Refer to the provided GIMP download link for practice.
- Before installing new software, run
sudo apt update and sudo apt upgrade.
- Use
apt help to explore more packaging commands.