apt-get 命令
apt-get 命令一般用於軟件包的安裝,更新和移除
apt-get update- 更新本地的軟件源索引。在你更改了 Raspbian 的/etc/apt/sources.list或/etc/apt/preferences后,需要運行這個命令讓改動生效。最好能定期運行該命令,以確保軟件源索引是最新的。apt-get upgrade- 更新所有已安裝的軟件包apt-get install- 安裝軟件包apt-get reinstall- 重裝軟件包apt-get remove- 刪除已安裝的軟件包(保留配置文件)apt-get purge- 刪除已安裝包,同時刪除配置文件apt-get autoremove- 刪除未使用的安裝包apt-get dist-upgrade- 更新整個系統到最新的發行版,相當於升級 Raspbian 系統apt-get clean- 刪除本地所有的 deb 包(不會刪除軟件)apt-get autoclean- 刪除本地已經安裝過的 deb 包apt-get check- 檢查是否存在未安裝的軟件包依賴apt-get source- 下載 deb 源碼包到本地apt-get download- 下載 deb 包到本地apt-get changelog- 打印軟件包的版本變更日志
apt-cache 命令
apt-cache 一般用於軟件包查找和顯示軟件包信息。
apt-cache search- 搜索軟件包。當你不知道軟件包全名的時候,可以用這個指令搜索關鍵詞apt-cache depends- 打印軟件包的依賴包信息apt-cache rdepends- 打印依賴這個包的軟件包信息(反向依賴)
