Moonglade

Modern Markdown blogging with AI-powered localization and search.

Tag: Repository Setup


How to use apt

This article provides a detailed introduction to common and advanced operational techniques for the APT package manager in Linux systems. It first covers basic commands, including using `apt list --installed` to view installed packages, utilizing `apt show` to retrieve package details such as version, dependencies, and maintainer information, and clearing the cache with `apt clean`. The article particularly emphasizes dependency management, noting that removing critical dependency packages (such as `git-man`) can lead to the simultaneous uninstallation of dependent software (such as `git`), so caution is required. In the advanced usage section, the article explains package pinning techniques in depth, demonstrating how to configure files under `/etc/apt/preferences.d/` to lock specific software versions or prevent the installation of specific packages (such as `snapd`). Additionally, it introduces methods for querying file lists within packages using `apt-file`, analyzing reverse dependencies with `apt-cache rdepends`, and adding PPA sources or enabling additional component repositories like `universe` via the `add-apt-repository` command. Finally, it briefly mentions reference resources for setting up a private APT mirror server, providing system administrators with a comprehensive and practical package management guide.

Views 204
Apt Package Management Dependency Queries Mirror Configuration Package Tools Repository Setup Software Installations