Table of contents
2. Upgrade installed software packages
3. Install the software package
4. Delete the software package
6. Display package information
8. Clean up useless software packages
foreword
In the Linux system, one of the commonly used software package management tools is apt (Advanced Package Tool). It is mainly used to install, update and remove packages, especially for Debian/Ubuntu based distributions.
1. Update the package list
This command updates the local package index with information about available packages and their versions.
sudo apt update
2. Upgrade installed software packages
This command upgrades installed packages to their latest versions.
sudo apt upgrade
3. Install the software package
Replace packagename with the name of the package you want to install.
sudo apt install 软件包名称
4. Delete the software package
Replace packagename with the name of the package you want to remove. This command removes the package but keeps its configuration files.
sudo apt remove 软件包名称
To delete a software package and its configuration files, you can use the purge command
sudo apt purge 软件包名称
5. List installed packages
This command will display a list of all installed packages.
apt list --installed
6. Display package information
This command displays detailed information about a specific package, including description, version, size, etc.
apt show 软件包名称
7. Search software packages
Use the apt search command to search for packages containing the specified keywords
apt search 关键字
8. Clean up useless software packages
This command automatically deletes dependencies and system caches that are no longer needed, helping to free up disk space.
sudo apt autoremove