title: ubuntu package manager(ubuntu 包管理器)
author: susu
date: 2021-01-01
site:
- cnblogs.com
https://soft.zol.com.cn/86/860671.html
https://soft.zol.com.cn/86/860671.html
https://drivers.160.com/xtwt/175487.html
ubuntu 包管理器
apt-get
# update repo info
apt-get update
# search package
apt-cache search package
# fetch package information, metadata...
apt-cache show package
# download & install
apt-get install package
# erase or remove
apt-get remove package
apt-get remove package --purge
# reinstall package
apt-get install package --reinstall
# repair abnormal installation
apt-get -f install
# 安装相关的编译环境
apt-get build-dep package
# upgrade instaled packages
apt-get upgrade
# upgrade the whole system opertating system
apt-get dist-upgrade
# query package's dependency
apt-cache depends package
# query what depends this package
apt-cache rdepends package
# download package's source code
apt-get source package
# clean useless packages
apt-get clean && apt-get autoclean
# check broken dependency
apt-get check