$ dpkg -l [package]
: 패키지 리스트 확인jsg@jsg-ubuntu:~$ dpkg -l * vim Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= un gvim < none > < none > (no description available) ii vim 2:7.4.1689-3 amd64 Vi IMproved - enhanced vi editor
$ dpkg -s package
: 패키지 status 확인jsg@jsg-ubuntu:~$ dpkg -s vim Package: vim Status: install ok installed Priority: optional Section: editors Installed-Size: 2404 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: amd64 Version: 2:7.4.1689-3ubuntu1.5 ...
$ dpkg -S pattern
: pattern이 들어간 패키지 파일을 검색sg@jsg-ubuntu:~$ dpkg -S vim vim-runtime: /usr/share/vim/vim74/keymap/bulgarian-bds.vim vim-runtime: /usr/share/vim/vim74/syntax/hitest.vim vim-runtime: /usr/share/vim/vim74/lang/menu_fi_fi.utf-8.vim vim-runtime: /usr/share/vim/vim74/keymap/greek_utf-8.vim vim-runtime: /usr/share/vim/vim74/plugin/zipPlugin.vim vim-runtime: /usr/share/vim/vim74/doc/ft_sql.txt ...
$ dpkg -C package
: 패키지가 잘 설치되었는지 검사 / 오류 해결 방안 제시deb[-src] uri suite components
# kakao list deb http://mirror.kakao.com/ubuntu/ xenial main restricted universe deb http://mirror.kakao.com/ubuntu/ xenial-updates main restricted universe deb http://mirror.kakao.com/ubuntu/ xenial-security main restricted universe
# apt update
root@jsg-ubuntu:~# apt update 받기:1 http://mirror.kakao.com/ubuntu xenial InRelease [247 kB] 받기:2 http://mirror.kakao.com/ubuntu xenial-updates InRelease [109 kB] 받기:3 http://mirror.kakao.com/ubuntu xenial-security InRelease [109 kB] 받기:4 http://mirror.kakao.com/ubuntu xenial/main amd64 Packages [1,201 kB] 받기:5 http://mirror.kakao.com/ubuntu xenial/main i386 Packages [1,196 kB] 받기:6 http://mirror.kakao.com/ubuntu xenial/main Translation-ko [80.2 kB] 받기:7 http://mirror.kakao.com/ubuntu xenial/main Translation-en [568 kB] 받기:8 http://mirror.kakao.com/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB] ...
$ apt list [options] [pattern]
jsg@jsg-ubuntu:~$ apt list vim Listing... Done vim/xenial-updates,xenial-security,now 2:7.4.1689-3ubuntu1.5 amd64 [installed] N: There is 1 additional version. Please use the '-a' switch to see it jsg@jsg-ubuntu:~$ apt list --installed vim Listing... Done vim/xenial-updates,xenial-security,now 2:7.4.1689-3ubuntu1.5 amd64 [installed] N: There is 1 additional version. Please use the '-a' switch to see it jsg@jsg-ubuntu:~$ apt list --upgradable vim Listing... Done jsg@jsg-ubuntu:~$ apt list --all-versions vim Listing... Done vim/xenial-updates,xenial-security,now 2:7.4.1689-3ubuntu1.5 amd64 [installed] vim/xenial 2:7.4.1689-3ubuntu1 amd64
apt search [-n] expression
jsg@jsg-ubuntu:~$ apt search vim-gnome Sorting... Done Full Text Search... Done vim-gnome/xenial-updates,xenial-security,now 2:7.4.1689-3ubuntu1.5 amd64 [installed] Vi IMproved - enhanced vi editor - with GNOME2 GUI vim-gnome-py2/xenial-updates,xenial-security 2:7.4.1689-3ubuntu1.5 amd64 Vi IMproved - enhanced vi editor - with GNOME2 GUI (Python2) vim-tiny/xenial-updates,xenial-security,now 2:7.4.1689-3ubuntu1.5 amd64 [installed] Vi IMproved - enhanced vi editor - compact version jsg@jsg-ubuntu:~$ apt search -n vim-gnome Sorting... Done Full Text Search... Done vim-gnome/xenial-updates,xenial-security,now 2:7.4.1689-3ubuntu1.5 amd64 [installed] Vi IMproved - enhanced vi editor - with GNOME2 GUI vim-gnome-py2/xenial-updates,xenial-security 2:7.4.1689-3ubuntu1.5 amd64 Vi IMproved - enhanced vi editor - with GNOME2 GUI (Python2)
$ apt show <package>[=version]
jsg@jsg-ubuntu:~$ apt show vim=2:7.4.1689-3ubuntu1.5 Package: vim Version: 2:7.4.1689-3ubuntu1.5 Priority: optional Section: editors Origin: Ubuntu ...
# apt purge package
: config/package 모두 삭제
# apt remove package
: package만 삭제
# apt autoremove
: 의존성이 깨지거나 버전 관리로 인해 쓰지 않는 패키지 자동 삭제