패키지가 OS에 설치되어 있는지 apt show 명령으로 알 수 있습니까?

패키지가 OS에 설치되어 있는지 apt show 명령으로 알 수 있습니까?

명령

apt show packagename

packagename이 발견되면 그에 대한 정보를 표시합니다. 하지만 이 명령(또는 다른 명령)이 packagename이 지금 설치되어 있는지도 표시할 수 있습니까? 2) 어느 저장소에서 설치되었습니까?

감사해요!

답변1

현재 활성화된 소스가 문제의 패키지를 제공하는지 확인 apt-cache policy하고 현재 사용 중인 패키지 버전(또는 아무것도 설치되지 않았습니다)

guiverc@d960-ubu2:~$   apt-cache policy ubuntu-desktop
ubuntu-desktop:
  Installed: 1.488
  Candidate: 1.488
  Version table:
 *** 1.488 100
        100 /var/lib/dpkg/status
     1.487 500
        500 http://archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

@Raffa가 제안하는 apt show

"와 같이 패키지가 설치되면 실제로 추가 줄이 표시됩니다.APT-수동-설치: 예"

내 상자에 동일한 결과가 나타납니다.

guiverc@d960-ubu2:~$    apt show ubuntu-desktop
Package: ubuntu-desktop
Version: 1.488
Status: install ok installed
Priority: optional
Section: metapackages
Source: ubuntu-meta
Maintainer: Ubuntu Developers <[email protected]>
Installed-Size: 54.3 kB
Provides: packagekit-installer
Depends: alsa-base, alsa-utils, anacron, at-spi2-core, bc, ca-certificates, dmz-cursor-theme, fonts-dejavu-core, fonts-freefont-ttf, foomatic-db-compressed-ppds, gdm3, ghostscript-x, gnome-control-center, gnome-menus, gnome-session-canberra, gnome-settings-daemon, gnome-shell, gnome-shell-extension-appindicator, gnome-shell-extension-desktop-icons-ng, gnome-shell-extension-ubuntu-dock, gstreamer1.0-alsa, gstreamer1.0-packagekit, gstreamer1.0-plugins-base-apps, inputattach, language-selector-common, language-selector-gnome, libatk-adaptor, libnotify-bin, libsasl2-modules, libu2f-udev, nautilus, openprinting-ppds, pipewire-pulse, printer-driver-pnm2ppa, rfkill, software-properties-gtk, spice-vdagent, ubuntu-desktop-minimal, ubuntu-drivers-common, ubuntu-release-upgrader-gtk, ubuntu-session, ubuntu-settings, unzip, update-manager, update-notifier, wireless-tools, wireplumber, wpasupplicant, xdg-user-dirs, xdg-user-dirs-gtk, xkb-data, xorg, yelp, zenity, zip
Recommends: aisleriot, apport-gtk, appstream, apt-config-icons-hidpi, avahi-autoipd, avahi-daemon, baobab, bluez, bluez-cups, branding-ubuntu, brltty, cheese, cups, cups-bsd, cups-client, cups-filters, deja-dup, dirmngr, eog, evince, file-roller, fonts-indic, fonts-kacst-one, fonts-khmeros-core, fonts-lao, fonts-liberation, fonts-liberation2, fonts-lklug-sinhala, fonts-noto-cjk, fonts-noto-color-emoji, fonts-opensymbol, fonts-sil-abyssinica, fonts-sil-padauk, fonts-thai-tlwg, fonts-tibetan-machine, fonts-ubuntu, fwupd, fwupd-signed, gamemode, gir1.2-gmenu-3.0, gnome-accessibility-themes, gnome-bluetooth, gnome-calculator, gnome-calendar, gnome-characters, gnome-disk-utility, gnome-font-viewer, gnome-initial-setup, gnome-keyring, gnome-logs, gnome-mahjongg, gnome-mines, gnome-power-manager, gnome-remote-desktop, gnome-sudoku, gnome-system-monitor, gnome-terminal, gnome-text-editor, gnome-todo, gpg-agent, gsettings-ubuntu-schemas, gvfs-fuse, hplip, ibus, ibus-gtk, ibus-gtk3, ibus-table, im-config, kerneloops, laptop-detect, libglib2.0-bin, libnss-mdns, libpam-fprintd, libpam-gnome-keyring, libpam-sss, libproxy1-plugin-gsettings, libproxy1-plugin-networkmanager, libreoffice-calc, libreoffice-gnome, libreoffice-impress, libreoffice-math, libreoffice-ogltrans, libreoffice-pdfimport, libreoffice-style-breeze, libreoffice-writer, libspa-0.2-bluetooth, libwmf0.2-7-gtk, memtest86+, mousetweaks, nautilus-sendto, nautilus-share, network-manager, network-manager-config-connectivity-ubuntu, network-manager-openvpn-gnome, network-manager-pptp-gnome, orca, packagekit, pcmciautils, plymouth-theme-spinner, policykit-desktop-privileges, printer-driver-brlaser, printer-driver-c2esp, printer-driver-foo2zjs, printer-driver-m2300w, printer-driver-min12xxw, printer-driver-ptouch, printer-driver-pxljr, printer-driver-sag-gdi, printer-driver-splix, remmina, rhythmbox, seahorse, shotwell, simple-scan, snapd, speech-dispatcher, system-config-printer, systemd-oomd, thunderbird, thunderbird-gnome-support, totem, transmission-gtk, ubuntu-docs, ubuntu-report, ubuntu-wallpapers, usb-creator-gtk, whoopsie, xcursor-themes, xdg-desktop-portal-gnome, xdg-utils, yaru-theme-gnome-shell, yaru-theme-gtk, yaru-theme-icon, yaru-theme-sound
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: The Ubuntu desktop system
 This package depends on all of the packages in the Ubuntu desktop system
 .
 It is also used to help ensure proper upgrades, so it is recommended that
 it not be removed.

N: There is 1 additional record. Please use the '-a' switch to see it

관련 정보