私の履歴が次のようになるとしましょう。
Start-Date: 2016-09-20 15:49:21
Commandline: apt-get install kchmviewer
Install: libkde3support4:amd64 (4.14.2-5+deb8u1, automatic), libresid-builder0c2a:amd64 (2.1.1-14, automatic), ntrack-module-libnl-0:amd64 (016-1.3, automatic), libmpeg2-4:amd64 (0.5.1-7, automatic), libwinpr-thread0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libkrosscore4:amd64 (4.14.2-5+deb8u1, automatic), libgpgme++2:amd64 (4.14.2-2+b1, automatic), oxygen-icon-theme:amd64 (4.14.0-1, automatic), libktexteditor4:amd64 (4.14.2-5+deb8u1, automatic), kdelibs5-data:amd64 (4.14.2-5+deb8u1, automatic), libchm1:amd64 (0.40a-3+b1, automatic), kchmviewer:amd64 (6.0-1), libcrystalhd3:amd64 (0.0~git20110715.fdd2f19-11, automatic), libdc1394-22:amd64 (2.2.3-1, automatic), libkdeui5:amd64 (4.14.2-5+deb8u1, automatic), libkdeclarative5:amd64 (4.14.2-5+deb8u1, automatic), libfam0:amd64 (2.7.0-17.1, automatic), libthreadweaver4:amd64 (4.14.2-5+deb8u1, automatic), libfreerdp-client1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libwinpr-utils0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libqt4-sql-mysql:amd64 (4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1, automatic), libfreerdp-core1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), kde-runtime:amd64 (4.14.2-2, automatic), libchromaprint0:amd64 (1.2-1, automatic), libwinpr-synch0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libkparts4:amd64 (4.14.2-5+deb8u1, automatic), nepomuk-core-data:amd64 (4.14.0-1, automatic), libqt4-sql:amd64 (4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1, automatic), libexiv2-13:amd64 (0.24-4.1, automatic), libqca2:amd64 (2.0.3-6, automatic), libntrack0:amd64 (016-1.3, automatic), upower:amd64 (0.99.1-3.2, automatic), kde-runtime-data:amd64 (4.14.2-2, automatic), libphonon4:amd64 (4.8.0-4, automatic), libwinpr-pool0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libkemoticons4:amd64 (4.14.2-5+deb8u1, automatic), vlc-plugin-notify:amd64 (2.2.4-1~deb8u1, automatic), libnepomukquery4a:amd64 (4.14.2-5+deb8u1, automatic), libkmediaplayer4:amd64 (4.14.2-5+deb8u1, automatic), libwinpr-handle0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libwinpr-crt0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libvlccore8:amd64 (2.2.4-1~deb8u1, automatic), libqt4-qt3support:amd64 (4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1, automatic), libdvbpsi9:amd64 (1.2.0-1, automatic), libfreerdp-cache1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libwinpr-interlocked0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), katepart:amd64 (4.14.2-2, automatic), libproxy-tools:amd64 (0.4.11-4+b2, automatic), vlc-nox:amd64 (2.2.4-1~deb8u1, automatic), libkdnssd4:amd64 (4.14.2-5+deb8u1, automatic), soprano-daemon:amd64 (2.9.4+dfsg-1.1, automatic), libupnp6:amd64 (1.6.19+git20141001-1, automatic), phonon:amd64 (4.8.0-4, automatic), libsoprano4:amd64 (2.9.4+dfsg-1.1, automatic), libdbusmenu-qt2:amd64 (0.9.2-1, automatic), libkatepartinterfaces4:amd64 (4.14.2-2, automatic), vlc-plugin-samba:amd64 (2.2.4-1~deb8u1, automatic), libusageenvironment1:amd64 (2014.01.13-1, automatic), kdelibs5-plugins:amd64 (4.14.2-5+deb8u1, automatic), libqt4-script:amd64 (4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1, automatic), libebml4:amd64 (1.3.0-2+deb8u1, automatic), libxcb-xv0:amd64 (1.10-3+b1, automatic), libkjsapi4:amd64 (4.14.2-5+deb8u1, automatic), libcddb2:amd64 (1.3.2-5, automatic), libbasicusageenvironment0:amd64 (2014.01.13-1, automatic), libkactivities6:amd64 (4.13.3-1, automatic), libfreerdp-codec1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libwinpr-input0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libgroupsock1:amd64 (2014.01.13-1, automatic), libiso9660-8:amd64 (0.83-4.2, automatic), libfreerdp-gdi1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libwinpr-heap0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libwinpr-rpc0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), vlc-data:amd64 (2.2.4-1~deb8u1, automatic), libwinpr-library0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libknewstuff3-4:amd64 (4.14.2-5+deb8u1, automatic), libnepomukutils4:amd64 (4.14.2-5+deb8u1, automatic), libfreerdp-locale1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libfreerdp-primitives1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), kdoctools:amd64 (4.14.2-5+deb8u1, automatic), libgles2-mesa:amd64 (10.3.2-1+deb8u1, automatic), libkxmlrpcclient4:amd64 (4.14.2-2+b1, automatic), libkpty4:amd64 (4.14.2-5+deb8u1, automatic), libkjsembed4:amd64 (4.14.2-5+deb8u1, automatic), libwinpr-registry0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libqt4-designer:amd64 (4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1, automatic), libsolid4:amd64 (4.14.2-5+deb8u1, automatic), libkhtml5:amd64 (4.14.2-5+deb8u1, automatic), libssh-gcrypt-4:amd64 (0.6.3-4+deb8u2, automatic), libntrack-qt4-1:amd64 (016-1.3, automatic), libtwolame0:amd64 (0.3.13-1.1, automatic), libkfile4:amd64 (4.14.2-5+deb8u1, automatic), libwinpr-sspi0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), phonon-backend-vlc:amd64 (0.8.0-2, automatic), libzvbi0:amd64 (0.2.35-3, automatic), mysql-common:amd64 (5.5.52-0+deb8u1, automatic), libgles1-mesa:amd64 (10.3.2-1+deb8u1, automatic), libattica0.4:amd64 (0.4.2-1, automatic), libkdesu5:amd64 (4.14.2-5+deb8u1, automatic), libmysqlclient18:amd64 (5.5.52-0+deb8u1, automatic), libdlrestrictions1:amd64 (0.15.15, automatic), libstreams0:amd64 (0.7.8-1.2+b2, automatic), libknotifyconfig4:amd64 (4.14.2-5+deb8u1, automatic), libfreerdp-rail1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libxcb-composite0:amd64 (1.10-3+b1, automatic), libfreerdp-common1.1.0:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libkdecore5:amd64 (4.14.2-5+deb8u1, automatic), kdelibs-bin:amd64 (4.14.2-5+deb8u1, automatic), libfreerdp-crypto1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libkactivities-bin:amd64 (4.13.3-1, automatic), libva-x11-1:amd64 (1.4.1-1, automatic), plasma-scriptengine-javascript:amd64 (4.14.2-2, automatic), libnepomukcore4:amd64 (4.14.0-1+b2, automatic), libshine3:amd64 (3.1.0-2.1, automatic), libnepomuk4:amd64 (4.14.2-5+deb8u1, automatic), libwinpr-path0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libzvbi-common:amd64 (0.2.35-3, automatic), libwinpr-dsparse0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), vlc:amd64 (2.2.4-1~deb8u1, automatic), libstreamanalyzer0:amd64 (0.7.8-1.2+b2, automatic), libvlc5:amd64 (2.2.4-1~deb8u1, automatic), libmodplug1:amd64 (0.8.8.4-4.1+b1, automatic), docbook-xsl:amd64 (1.78.1+dfsg-1, automatic), libmatroska6:amd64 (1.4.1-2+deb8u1, automatic), libkntlm4:amd64 (4.14.2-5+deb8u1, automatic), libkdewebkit5:amd64 (4.14.2-5+deb8u1, automatic), liblivemedia23:amd64 (2014.01.13-1, automatic), libvcdinfo0:amd64 (0.7.24+dfsg-0.2, automatic), libiodbc2:amd64 (3.52.9-2, automatic), libwinpr-sysinfo0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libkcmutils4:amd64 (4.14.2-5+deb8u1, automatic), libpolkit-qt-1-1:amd64 (0.103.0-1, automatic), libsidplay2:amd64 (2.1.1-14, automatic), libwinpr-environment0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libva-drm1:amd64 (1.4.1-1, automatic), libkactivities-models1:amd64 (4.13.3-1, automatic), libnl-route-3-200:amd64 (3.2.24-2, automatic), libkate1:amd64 (0.4.1-4, automatic), libkio5:amd64 (4.14.2-5+deb8u1, automatic), libxml2-utils:amd64 (2.9.1+dfsg1-5+deb8u3, automatic), kate-data:amd64 (4.14.2-2, automatic), libfreerdp-utils1.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libvncclient0:amd64 (0.9.9+dfsg2-6.1+deb8u1, automatic), vlc-plugin-pulse:amd64 (2.2.4-1~deb8u1, automatic), libplasma3:amd64 (4.14.2-5+deb8u1, automatic), libupower-glib3:amd64 (0.99.1-3.2, automatic), libwinpr-file0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libqt4-declarative:amd64 (4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1, automatic), libwinpr-crypto0.1:amd64 (1.1.0~git20140921.1.440916e+dfsg1-4, automatic), libmpcdec6:amd64 (0.1~r459-4.1, automatic)
End-Date: 2016-09-20 15:50:34
リストされているパッケージはたくさんありますが、パッケージ名libkde3support4:amd64 (4.14.2-5+deb8u1, automatic)
はlibkde3support4
。
私はlxdeとDebianを使用しています。
以下を使用して両方のパッケージを削除しますapt-get remove kchmviewer && apt-get autoremove
。
Start-Date: 2016-09-20 15:51:15
Commandline: apt-get remove kchmviewer
Remove: kchmviewer:amd64 (6.0-1)
End-Date: 2016-09-20 15:51:18
Start-Date: 2016-09-20 15:51:32
Commandline: apt-get autoremove
Remove: libchm1:amd64 (0.40a-3+b1)
End-Date: 2016-09-20 15:51:33
答え1
kchmviewer
理論的には、自動的にインストールされたすべてのパッケージを削除してこのインストールを「元に戻す」ことができます。
apt-get remove kchmviewer && apt-get autoremove
ただし、2番目のコマンドで削除されたパッケージに注意してください。ただし、自動削除では目的の結果が得られない場合があります。既定では、このコマンドは、インストールされている他のパッケージで推奨されている場合は、自動的にインストールされたパッケージを削除しません。 (望むより「apt-get autoremove」が機能しないのはなぜですか?もっと学ぶ。 )
ログを処理するには、このsed
コマンドを使用して「Install:」行を使用できるパッケージのリストに変換できますapt-get remove
( `apt-get Remove kchmviewerで使用)。
sed 's/([^)]*)//g;s/Install: //;s/ ,//g'
ログを次のファイルに記録しますlog
(質問に提供された行のみを含む).
apt-get remove kchmviewer $(grep Install: log | sed 's/([^)]*)//g;s/Install: //;s/ ,//g')