dpkg 維護了一些關於可見套件的有用資訊,主要分為三類:狀態 (states)、選擇狀態 (selection states) 與旗標 (flags)。
套件狀態可以由
dpkg-query -s package_name
查詢,若查詢不到代表套件沒有安裝於系統上,也就是處於狀態 Not-Installed。
套件沒有被安裝在系統上
只有設定檔保留在系統上,此狀態是僅移除套件而沒有清除套件的狀態。
套件安裝已經開始,但基於某些原因而沒有完成。
套件檔案已經被解封裝,但尚未設定。
套件檔案已經解封裝且設定已經開始,但基於某些原因而沒有完成。
此套件正在等待別的套件出發來繼續執行
套件正在被處發
套件已經解封裝並安裝完成
install
The package is selected for installation.
hold A package marked to be on hold is not handled by dpkg, unless
forced to do that with option --force-hold.
deinstall
The package is selected for deinstallation (i.e. we want to
remove all files, except configuration files).
purge The package is selected to be purged (i.e. we want to remove
everything from system directories, even configuration files).
代表此套件損壞需要重新安裝。標示此旗標的套件不能被移除,必須先重新安裝成功或在移除時增加參數 --force-remove-reinstreq
。