패키지 목록 확인할때

apt-cache pkgname

dpkg -l

설치된 패키지 목록 확인하는 명령어 인데요

apt-cache pkgname // 얘는 패키지목록이 약 3만6천개정도…

dpkg -l // 이건 360개 정도의 패키지목록을 뿌려주는데요

정확하게 어떤차이가 있는건지…

그냥 단순히 예를 들면 ls 와 ls -al 의 차이인셈인지 궁금하네요

아 그리고 내 시스템에 설치되어있는 패키지 목록말고
업데이트가 될 패키지목록 확인 할 수 있는 방법이 있을까요?

p.s
데스크탑용 아니라 서버용 우분투 입니다

dpkg는 dpkg데이터베이스에 질의합니다.
/var/lib/dpkg/status파일에 설치된 패키지 정보가 저장되어 있습니다.
즉, 이것은 설치된 프로그램들에 대한 검색이되겠구요.
apt-cache는 말그대로 cache이니,
apt-get update명령 실행시
소프트웨어저장소 목록에서 받아온 패키지 목록과 정보를 이용하여 검색하게 됩니다.
즉, 설치되어 있지 않더라도, 소프트웨어저장소 목록에 들어 있으면 검색됩니다.

답변 감사합니다~

한가지 더 질문이있는데요

데스크탑용 우분투에서는 업데이트 목록을 gui 창으로 확인 하면서
설치하고 싶은것만 체크해서 설치 할 수 있잖아요?

서버에서도 그 패키지 목록을 확인 할 수 있을까요?

아 또하나 데스크탑용 우분투 업데이트목록에 나오는 그 패키지들이
시스템에 설치된 패키지를 업데이트 하라고 나오는건지
아니면 시스템에 설치가 되어 있지 않더라도 권장사항으로 패키지 설치하라고 나오는건지도 궁금하네요~

[quote="xownsz":2evdbjpn]답변 감사합니다~

한가지 더 질문이있는데요

데스크탑용 우분투에서는 업데이트 목록을 gui 창으로 확인 하면서
설치하고 싶은것만 체크해서 설치 할 수 있잖아요?

서버에서도 그 패키지 목록을 확인 할 수 있을까요?

아 또하나 데스크탑용 우분투 업데이트목록에 나오는 그 패키지들이
시스템에 설치된 패키지를 업데이트 하라고 나오는건지
아니면 시스템에 설치가 되어 있지 않더라도 권장사항으로 패키지 설치하라고 나오는건지도 궁금하네요~[/quote:2evdbjpn]

서버버젼을 써보지 않아서 모르겠네요.
그래픽화면을 보시려면 xserver-xorg패키지가 설치되어 X가 구동될 수 있어야 합니다.
그리고, 시냅틱이라던가 우분투소프트웨어 센터를 사용하시려면, GTK라이브러리가 설치되어 있어야 합니다.
apitude패키지가 CUI(Console User Interface)로 구현되어 있으니, 그것을 사용하세요.

그리고, 패키지중에는 권장(Recommended)패키지와 추천(Suggest)패키지가 있습니다.
권장패키지는 설치되지 않은 패키지중에… 많이 사용되어지는것으로 사용하길 권장하는 패키지들이구요.
추천패키지는 어떤 패키지를 설치하였을 경우, 관련하여 설치될수있는 패키지들입니다.
자동으로 설치되지는 않습니다.

sudo apt-get --install-suggest samba 머 이런식이면…
삼바관련 소프트웨어들이 설치되겠지요.

protochaos님 말씀대로 aptitude 사용하시는게 최상인 것 같습니다.

aptitude install xxxx 이런식으로 apt-get 대체로도 사용 가능하고 옵션 없이 aptitude 명령만 치면 ncurse 기반의 그래픽 화면으로 실행 됩니다. 사용법은 도움말을 좀 보셔야 이해될 겁니다. 처음엔 좀 복잡하더군요. Synaptic 써보신 경험 있으면 어떤 프로그램인지 아실 겁니다.
[list:14avmoon]
[:14avmoon]업그레이드 가능한 패키지[/:m:14avmoon]
[:14avmoon]저장소에 새로 추가된 패키지[/:m:14avmoon]
[:14avmoon]선택적인 업그레이드[/:m:14avmoon]
[:14avmoon]해당 패키지가 제안, 추천하는 패키지[/:m:14avmoon][/list:u:14avmoon]
이런 작업들 전부 가능합니다. 원래 dpkg, apt에서 지원하는 기능들이긴 하지만 좀 더 간편하게 사용할 수 있다고 볼 수 있겠네요.

또 한 가지 추천드리고 싶은 건 wajig이라는 프로그램인데요. aptitude 보다 편리한 게 없나 해서 찾다가 발견해서 얼마전부터 사용하고 있습니다. 아주 널리 사용되는 프로그램은 아닌 것 같아서 추천하기가 좀 애매하지만 어쨌든 편리하게 잘 사용하고 있습니다.

[code:14avmoon]
$ wajig update # apt-get update
$ wajig toupgrade # 어떤 패키지들이 업그레이드 가능한지 출력
$ wajig new # 저장소에 새로 추가된 패키지 출력
$ wajig upgrade # apt-get upgrade
$ wajig search
...
[/code:14avmoon]
apt, aptitude에서 제공하는 명령들은 다 있다고 보시면 되구요 추가 기능들도 꽤 있습니다. sudo를 자체적으로 실행해줘서 sudo를 앞에 붙이지 않아도 됩니다. 시스템 데몬들 시작, 정지, 재시작 같은 명령도 지원 합니다.

[code:14avmoon]

COMMANDS:
addcdrom Add a CD-ROM to the list of available sources of packages
addrepo Add a Launchpad PPA (Personal Package Archive) repository
auto-alts Mark the alternative to be auto set (using set priorities)
auto-clean Remove superceded .deb files from the download cache
auto-download Do an update followed by a download of all updated packages
autoremove Remove packages installed automatically as dependencies.
bug Report a bug in a package using Debian BTS (Bug Tracking System).
build Retrieve/unpack sources and build .deb for the named packages
build-depend Retrieve packages required to build listed packages
changelog Display Debian changelog for a given package
clean Remove all deb files from the download cache
commands Display all the JIG commands and one short descriptions for each
contents List the contents of a package file
daily-upgrade Perform an update then a dist-upgrade
dependents List of packages which depend/recommend/suggest the package
describe One line description of packages (-v and -vv for more detail)
describe-new One line description of new packages
detail Provide a detailed description of package (describe -vv)
detail-new Provide a detailed description of new packages (describe -vv)
dist-upgrade Upgrade to new distribution (installed and new rqd packages)
docs Equivalent to help with -verbose=2
download Download package files ready for an install
download-file Download packages listed in file ready for an install
editsources Edit list of archives which locates Debian package sources
extract Extract the files from a package file to a directory
find-file Search for a file within installed packages
find-pkg Search for an unofficial Debian package at apt-get.org
fix-configure Perform dpkg --configure -a (to fix interrupted configure)
fix-install Perform apt-get -f install (to fix broken dependencies)
fix-missing Perform apt-get --fix-missing upgrade
force Install packages and ignore file overwrites and depends
help Print documentation (detail depends on --verbose)
hold Place listed packages on hold so they are not upgraded
init Initialise or reset the JIG archive files
info List the information contained in a package file
install Install one or more packages or .deb files
install-file Install those packages that are listed in a file
installs Install package and associated suggested packages
install/dist Install packages from specified dist (must be in sources.list)
integrity Check the integrity of installed packages (through checksums)
large List size of all large (>10MB) installed packages
last-update Identify when an update was last performed
list List the status and description of installed packages
list-all List a one line description of given or all packages
list-alts List the objects that can have alternatives configured
list-cache List the contents of the download cache
list-commands List all the JIG commands and one line descriptions for each
list-daemons List the daemons that JIG can start/stop/restart
list-files List the files that are supplied by the named package
list-hold List those packages on hold
list-installed List packages (with optional argument substring) installed
list-log Display APT log file
list-names List all known packages or those containing supplied string
list-orphans List libraries not required by any installed package
list-scripts List the control scripts of the package of deb file
list-section List packages that belong to a specific section
list-sections List the sections that are available
list-status Same as list but only prints first two columns, not truncated
list-wide Same as list but avoids truncating package names
local-dist-upgrade Dist-upgrade using packages already downloaded
local-upgrade Upgrade using packages already downloaded, but not any others
madison Runs the madison command of apt-cache.
move Move packages in the download cache to a local Debian mirror
new List packages that became available since last update
news Display package NEWS file(s).
new-upgrades List packages newly available for upgrading
non-free List installed packages that do not meet the DFSG
orphans List libraries not required by any installed package
policy From preferences file show priorities/policy (available)
purge Remove one or more packages and their configuration files
purge-orphans Purge orphaned libraries (not required by installed packages)
purge-removed Purge all packages marked as deinstall
rbuilddeps Display the packages which build-depends on the given package (long form is "reverse-build-depends")
readme Display the package’s README file from /usr/share/doc
list-recommended Display packages that were installed via Recommends and have no dependents
recursive Download package and any packages it depends on
reconfigure Reconfigure the named installed packages or run gkdebconf
reinstall Reinstall each of the named packages
reload Reload daemon configs, e.g., gdm, apache (see list-daemons)
remove Remove one or more packages (see also purge)
remove-file Remove those packages that are listed in a file
remove-orphans Remove orphaned libraries (not required by installed packages)
repackage Generate a .deb file for an installed package
reset Initialise or reset the JIG archive files
restart Stop then start a daemon, e.g., gdm, apache (see list-daemons)
rpm2deb Convert a RedHat .rpm file to a Debian .deb file
rpminstall Install a RedHat .rpm package
search Search for packages containing listed words
search-apt Find local Debian archives suitable for sources.list
setup Alias for editsources
showdistupgrade Trace the steps that a dist-upgrade would perform
showinstall Trace the steps that an install would perform
showremove Trace the steps that a remove would perform
showupgrade Trace the steps that an upgrade would perform
sizes Print out the size (in K) of all, or listed, installed packages
snapshot Generates list of package=version for all installed packages
source Retrieve and unpack sources for the named packages
start Start a daemon, e.g., gdm, apache (see list-daemons)
status Show the version and available version of packages
status-search Show the version and available version of matching packages
stop Stop a daemon, e.g., gdm, apache (see list-daemons)
tasksel Run the task selector to install groups of packages
toupgrade List packages with newer versions available for upgrading
unhold Remove listed packages from hold so they are again upgraded
update Update the list of downloadable packages
update-alts Update default alternative for things like x-window-manager
update-pci-ids Updates the local list of PCI ids from the internet master list
update-usb-ids Updates the local list of USB ids from the internet master list
upgrade Upgrade all of the installed packages
verify Check the md5sums of a package.
version Show the current version of wajig.
versions List version and distribution of (all) packages.
whatis A synonym for describe
whichpkg Find the package that supplies the given command or file

OPTIONS:
-b|–backup=DIR UPGRADE - Backup packages before they are upgraded.
-f|–fast SHOW - use apt-cache’s version, due to its speed.
-h|–help Print usage message.
-n|–noauth Allow packages from unathenticated archives.
-P|–pager CHANGELOG - Use a pager for viewing the entire Debian changelog of a package.
-p|–pause Pause before exiting.
-q|–quiet Execute system commands quietly.
-s|–simulate Show commands to be executed but don’t execute.
-t|–teaching Show commands to be executed and then execute them.
-v|–verbose=n Increase (or set) the level of verbosity (to n).
-r|–recommends Used with INSTALL, to install Recommends too (this is Debian default).
-R|–norecommends Used with INSTALL, to NOT install Recommends.
-y|–yes Assume yes for any questions asked.
[/code:14avmoon]

성의 있는 답변 정말 감사합니다~^^
많은 도움이 됐네요~