Dependencies

在 POP_OS 中刪除滑鼠墊依賴是否安全?

  • October 3, 2021

注意:最初在Ask Ubuntu上發布了問題,他們親切地指向這個 StackExchange,因為它更適合非官方的 Ubuntu 衍生產品。


背景資料。

目前執行 POP_OS 20.04

在作業系統版本為 18.10 時安裝mousepad文本編輯器,並在升級到後續作業系統版本期間將其用作預設文本編輯器。我現在正在執行 Pop_OS 20.04 LTS,發現它gedit可以很好地用於基本文本編輯。現在準備刪除mousepad(如果安全且可能,連同任何不必要的依賴項)。

已設置gedit為預設文本編輯器。

首次嘗試mousepad通過 POP Shop 解除安裝 0.4.2(deb 版本)出現以下錯誤,

解除安裝“滑鼠墊”失敗

This may have been caused by external or manually compiled software.
The following packages have unmet dependencies:
 gir1.2-gtksource-3.0: Depends: libgtksourceview-3.0-1 (>= 3.23.90) but it is not going to be installed

使用命令行查看刪除滑鼠墊(僅)給出以下內容,

sudo apt remove mousepad

0 升級,0 新安裝,1 刪除和 0 未升級。

此操作後,將釋放 1,612 kB 磁碟空間。(暫時中止)

然後查看mousepad使用命令刪除和依賴項,

username@computer:~$ sudo apt autoremove mousepad
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
 diffstat engrampa engrampa-common exfalso fonts-font-awesome fonts-lato
 fuseiso gir1.2-gst-plugins-base-1.0 gir1.2-gtksource-3.0
 gir1.2-javascriptcoregtk-4.0 gir1.2-keybinder-3.0 gir1.2-webkit2-4.0
 gnome-shell-extension-pop-battery-icon-fix gnustep-base-common
 gnustep-base-runtime gnustep-common i965-va-driver:i386 icoutils
 intel-media-va-driver:i386 javascript-common libaom0:i386 libappindicator1
 libappstreamqt2 libapt-pkg-perl libaribb24-0:i386 libasn1-8-heimdal:i386
 libasound2:i386 libasound2-plugins:i386 libasync-mergepoint-perl
 libasyncns0:i386 libavahi-client3:i386 libavahi-common-data:i386
 libavahi-common3:i386 libavcodec-extra58:i386 libavutil56:i386
 libb-hooks-endofscope-perl libb-hooks-op-check-perl libbrotli1:i386
 libcaja-extension1 libcapi20-3 libcapi20-3:i386 libcapture-tiny-perl
 libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl
 libcodec2-0.9:i386 libcpanel-json-xs-perl libcups2:i386 libcurl3-gnutls:i386
 libdatrie1:i386 libdbus-1-3:i386 libdbusmenu-gtk4 libdevel-callchecker-perl
 libdevel-size-perl libdigest-bubblebabble-perl libdrm-amdgpu1:i386
 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
 libdynaloader-functions-perl libelf1:i386 libemail-valid-perl libexif12:i386
 libexporter-tiny-perl libfaudio0 libfaudio0:i386 libfile-find-rule-perl
 libflac8:i386 libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4
 libfm-modules libfm4 libfont-ttf-perl libfox-1.6-0 libfribidi0:i386
 libfuture-perl libgc1c2 libgd3:i386 libgdbm-compat4:i386 libgdbm6:i386
 libgdk-pixbuf2.0-0:i386 libgl1:i386 libgl1-mesa-dri:i386
 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglu1-mesa:i386 libglvnd0:i386
 libglx-mesa0:i386 libglx0:i386 libgmp10:i386 libgnustep-base1.26
 libgnutls30:i386 libgomp1:i386 libgphoto2-6:i386 libgphoto2-port12:i386
 libgraphite2-3:i386 libgsettings-qt1 libgsm1:i386 libgssapi-krb5-2:i386
 libgssapi3-heimdal:i386 libgtk2-perl libgtksourceview-3.0-1
 libgtksourceview-3.0-common libharfbuzz0b:i386 libhcrypto4-heimdal:i386
 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhogweed5:i386
 libhx509-5-heimdal:i386 libicu66:i386 libieee1284-3:i386 libigdgmm11:i386
 libimport-into-perl libio-async-loop-epoll-perl libio-async-perl
 libio-pty-perl libio-string-perl libipc-run-perl libjack-jackd2-0:i386
 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjs-jquery libjs-modernizr
 libjs-sphinxdoc libjs-underscore libjson-maybexs-perl libk5crypto3:i386
 libkeybinder-3.0-0 libkeyutils1:i386 libkf5itemmodels5
 libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms2-2:i386
 libldap-2.4-2:i386 liblinux-epoll-perl liblist-compare-perl
 liblist-moreutils-perl libltdl7:i386 libmarkdown2 libmenu-cache-bin
 libmenu-cache3 libmodule-implementation-perl libmodule-runtime-perl
 libmoo-perl libmoox-aliases-perl libmp3lame0:i386 libmpg123-0:i386
 libmysqlclient21:i386 libnamespace-clean-perl libnet-dns-perl
 libnet-dns-sec-perl libnet-domain-tld-perl libnet-ip-perl libnettle7:i386
 libnghttp2-14:i386 libnotify-bin libnuma1:i386 libnumber-compare-perl
 libobjc4 libodbc1:i386 libopenal1:i386 libopenjp2-7:i386 libosmesa6
 libosmesa6:i386 libp11-kit0:i386 libpackage-stash-perl
 libpackage-stash-xs-perl libpackagekitqt5-1 libpango-1.0-0:i386
 libpango-perl libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386
 libparams-classify-perl libpath-tiny-perl libpcap0.8:i386 libpci3:i386
 libpciaccess0:i386 libpeony2 libperl5.30:i386 libperlio-gzip-perl
 libpsl5:i386 libpulse0:i386 libqhttpengine0 libreadonly-perl
 libref-util-perl libref-util-xs-perl libroken18-heimdal:i386
 librole-tiny-perl librsvg2-2:i386 librsvg2-common:i386 librtmp1:i386
 libsamplerate0:i386 libsane:i386 libsasl2-2:i386 libsasl2-modules:i386
 libsasl2-modules-db:i386 libsdl2-2.0-0:i386 libsensors5:i386
 libsereal-decoder-perl libsereal-encoder-perl libsereal-perl libshine3:i386
 libsnapd-qt1 libsnappy1v5:i386 libsndfile1:i386 libsndio7.0:i386
 libsnmp35:i386 libsoxr0:i386 libspeex1:i386 libsqlite3-0:i386 libssh-4:i386
 libssl1.1:i386 libstb0 libstb0:i386 libstrictures-perl libstruct-dumb-perl
 libsub-exporter-progressive-perl libsub-identify-perl libsub-quote-perl
 libswresample3:i386 libsystemd0:i386 libtasn1-6:i386 libtest-fatal-perl
 libtest-refcount-perl libtext-glob-perl libtext-levenshtein-perl
 libthai0:i386 libtiff5:i386 libtwolame0:i386 libtype-tiny-perl
 libtype-tiny-xs-perl libudev1:i386 libunicode-utf8-perl libusb-1.0-0:i386
 libv4l-0:i386 libv4lconvert0:i386 libva-drm2:i386 libva-x11-2:i386
 libva2:i386 libvariable-magic-perl libvdpau1:i386 libvkd3d1 libvkd3d1:i386
 libvo-amrwbenc0:i386 libvpx6:i386 libvulkan1:i386 libwavpack1:i386
 libwayland-client0:i386 libwayland-cursor0:i386 libwayland-egl1:i386
 libwebp6:i386 libwebpmux3:i386 libwind0-heimdal:i386 libwrap0:i386
 libx11-xcb1:i386 libx265-179:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386
 libxcb-glx0:i386 libxcb-present0:i386 libxcb-randr0:i386 libxcb-sync1:i386
 libxcb-xfixes0:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386
 libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-3
 libxfixes3:i386 libxi6:i386 libxinerama1:i386 libxkbcommon0:i386
 libxml-writer-perl libxml2:i386 libxpm4:i386 libxrandr2:i386
 libxshmfence1:i386 libxslt1.1:i386 libxss1:i386 libxvidcore4:i386
 libxxf86vm1:i386 libyaml-libyaml-perl libzvbi0:i386 lintian lxmenu-data
 mate-desktop-common mate-terminal-common mesa-va-drivers:i386
 mesa-vdpau-drivers:i386 mesa-vulkan-drivers:i386 mousepad
 ocl-icd-libopencl1:i386 p7zip p7zip-full parchives patchutils
 python3-dbus.mainloop.pyqt5 python3-feedparser python3-musicbrainzngs
 python3-mutagen python3-pyflatpak python3-pyinotify
 qml-module-org-kde-kcoreaddons qml-module-org-kde-kquickcontrols
 qml-module-org-kde-qqc2desktopstyle qml-module-qtquick-controls
 qml-module-qtquick-dialogs qml-module-qtquick-layouts
 qml-module-qtquick-privatewidgets qt5-gtk2-platformtheme
 sphinx-rtd-theme-common t1utils unar va-driver-all:i386
 vdpau-driver-all:i386 xarchiver xfconf
0 upgraded, 0 newly installed, 324 to remove and 0 not upgraded.
After this operation, 787 MB disk space will be freed.
Do you want to continue? [Y/n] (aborted for now)

我可能只刪除mousepad(1,612 kB) 就可以了,但肯定想刪除 787 MB 的 324 顯然不再需要的依賴項。但是,鑑於返回的資訊量不夠,沒有足夠的知識和經驗告訴終端是 - 請刪除這些。

問題:在不引起災難性問題的情況下刪除這些依賴項真的基本上安全嗎?如果沒有,我很想知道這裡發生了什麼……

到目前為止,已經了解 autoremove 命令只會刪除不再需要的依賴項(可以安全解除安裝),但這種假設可能不正確。

sudo apt autoremove 不會破壞任何東西或刪除其他包所需的依賴項。

使用滑鼠墊的額外參數執行它, sudo apt autoremove mousepad只會將滑鼠墊和它的唯一依賴項添加到要刪除的孤兒列表中。

引用自:https://unix.stackexchange.com/questions/646854