主机平台:Gentoo Linux 11.2
内核版本:Linux Kernel 3.2.1
原创作品,转载请标明出处http://blog.csdn.net/yming0221/article/details/7412997
我们都喜欢Gentoo下的软件安装,多亏了Portage的技术,高度定制,编译安装过程中基本不会出现依赖的错误,也不会存在源码安装情况下的版本问题。不过自己感觉如果从源中emerge安装来一个软件,它会自动解决依赖,也会装一些其他的包,当我们将这个软件卸载后,其他的软件包貌似没有完全删除。
下面我就通过日志信息来还原安装前的状态。
首先查看日志,将/var/log/emerge.log下相应时间戳的内容复制到一个空白文件pack.log中。
形如:
1332998017: === (1 of 17) Cleaning (dev-libs/kpathsea-6.0.1_p20110705::/usr/portage/dev-libs/kpathsea/kpathsea-6.0.1_p20110705.ebuild)
1332998021: === (1 of 17) Compiling/Merging (dev-libs/kpathsea-6.0.1_p20110705::/usr/portage/dev-libs/kpathsea/kpathsea-6.0.1_p20110705.ebuild)
1332998097: === (1 of 17) Merging (dev-libs/kpathsea-6.0.1_p20110705::/usr/portage/dev-libs/kpathsea/kpathsea-6.0.1_p20110705.ebuild)
1332998099: >>> AUTOCLEAN: dev-libs/kpathsea:0
1332998106: === (1 of 17) Post-Build Cleaning (dev-libs/kpathsea-6.0.1_p20110705::/usr/portage/dev-libs/kpathsea/kpathsea-6.0.1_p20110705.ebuild)
1332998106: ::: completed emerge (1 of 17) dev-libs/kpathsea-6.0.1_p20110705 to /
1332998106: >>> emerge (2 of 17) dev-libs/zziplib-0.13.60-r1 to /
1332998106: === (2 of 17) Cleaning (dev-libs/zziplib-0.13.60-r1::/usr/portage/dev-libs/zziplib/zziplib-0.13.60-r1.ebuild)
1332998107: === (2 of 17) Compiling/Merging (dev-libs/zziplib-0.13.60-r1::/usr/portage/dev-libs/zziplib/zziplib-0.13.60-r1.ebuild)
1332998158: === (2 of 17) Merging (dev-libs/zziplib-0.13.60-r1::/usr/portage/dev-libs/zziplib/zziplib-0.13.60-r1.ebuild)
1332998159: >>> AUTOCLEAN: dev-libs/zziplib:0
1332998160: === (2 of 17) Post-Build Cleaning (dev-libs/zziplib-0.13.60-r1::/usr/portage/dev-libs/zziplib/zziplib-0.13.60-r1.ebuild)
1332998160: ::: completed emerge (2 of 17) dev-libs/zziplib-0.13.60-r1 to /
1332998160: >>> emerge (3 of 17) dev-tex/bibtexu-3.71_p20110705 to /
1332998160: === (3 of 17) Cleaning (dev-tex/bibtexu-3.71_p20110705::/usr/portage/dev-tex/bibtexu/bibtexu-3.71_p20110705.ebuild)
1332998165: === (3 of 17) Compiling/Merging (dev-tex/bibtexu-3.71_p20110705::/usr/portage/dev-tex/bibtexu/bibtexu-3.71_p20110705.ebuild)
1332998229: === (3 of 17) Merging (dev-tex/bibtexu-3.71_p20110705::/usr/portage/dev-tex/bibtexu/bibtexu-3.71_p20110705.ebuild)
1332998231: >>> AUTOCLEAN: dev-tex/bibtexu:0
1332998233: === (3 of 17) Post-Build Cleaning (dev-tex/bibtexu-3.71_p20110705::/usr/portage/dev-tex/bibtexu/bibtexu-3.71_p20110705.ebuild)
1332998233: ::: completed emerge (3 of 17) dev-tex/bibtexu-3.71_p20110705 to /
1332998233: >>> emerge (4 of 17) app-text/dvipsk-5.991_p20110705-r1 to /
1332998233: === (4 of 17) Cleaning (app-text/dvipsk-5.991_p20110705-r1::/usr/portage/app-text/dvipsk/dvipsk-5.991_p20110705-r1.ebuild)
1332998238: === (4 of 17) Compiling/Merging (app-text/dvipsk-5.991_p20110705-r1::/usr/portage/app-text/dvipsk/dvipsk-5.991_p20110705-r1.ebuild)
1332998313: === (4 of 17) Merging (app-text/dvipsk-5.991_p20110705-r1::/usr/portage/app-text/dvipsk/dvipsk-5.991_p20110705-r1.ebuild)
1332998314: >>> AUTOCLEAN: app-text/dvipsk:0
1332998316: === (4 of 17) Post-Build Cleaning (app-text/dvipsk-5.991_p20110705-r1::/usr/portage/app-text/dvipsk/dvipsk-5.991_p20110705-r1.ebuild)
1332998316: ::: completed emerge (4 of 17) app-text/dvipsk-5.991_p20110705-r1 to /
1332998316: >>> emerge (5 of 17) app-text/ps2pkm-1.5_p20110705 to /
1332998316: === (5 of 17) Cleaning (app-text/ps2pkm-1.5_p20110705::/usr/portage/app-text/ps2pkm/ps2pkm-1.5_p20110705.ebuild)
1332998321: === (5 of 17) Compiling/Merging (app-text/ps2pkm-1.5_p20110705::/usr/portage/app-text/ps2pkm/ps2pkm-1.5_p20110705.ebuild)
1332998376: === (5 of 17) Merging (app-text/ps2pkm-1.5_p20110705::/usr/portage/app-text/ps2pkm/ps2pkm-1.5_p20110705.ebuild)
1332998377: >>> AUTOCLEAN: app-text/ps2pkm:0
1332998379: === (5 of 17) Post-Build Cleaning (app-text/ps2pkm-1.5_p20110705::/usr/portage/app-text/ps2pkm/ps2pkm-1.5_p20110705.ebuild)
1332998379: ::: completed emerge (5 of 17) app-text/ps2pkm-1.5_p20110705 to /
1332998379: >>> emerge (6 of 17) x11-proto/printproto-1.0.5 to /
1332998379: === (6 of 17) Cleaning (x11-proto/printproto-1.0.5::/usr/portage/x11-proto/printproto/printproto-1.0.5.ebuild)
1332998379: === (6 of 17) Compiling/Merging (x11-proto/printproto-1.0.5::/usr/portage/x11-proto/printproto/printproto-1.0.5.ebuild)
1332998390: === (6 of 17) Merging (x11-proto/printproto-1.0.5::/usr/portage/x11-proto/printproto/printproto-1.0.5.ebuild)
1332998392: >>> AUTOCLEAN: x11-proto/printproto:0
1332998393: === (6 of 17) Post-Build Cleaning (x11-proto/printproto-1.0.5::/usr/portage/x11-proto/printproto/printproto-1.0.5.ebuild)
1332998393: ::: completed emerge (6 of 17) x11-proto/printproto-1.0.5 to /
1332998393: >>> emerge (7 of 17) virtual/perl-Getopt-Long-2.380.0-r1 to /
1332998393: === (7 of 17) Cleaning (virtual/perl-Getopt-Long-2.380.0-r1::/usr/portage/virtual/perl-Getopt-Long/perl-Getopt-Long-2.380.0-r1.ebuild)
1332998394: === (7 of 17) Compiling/Merging (virtual/perl-Getopt-Long-2.380.0-r1::/usr/portage/virtual/perl-Getopt-Long/perl-Getopt-Long-2.380.0-r1.ebuild)
1332998397: === (7 of 17) Merging (virtual/perl-Getopt-Long-2.380.0-r1::/usr/portage/virtual/perl-Getopt-Long/perl-Getopt-Long-2.380.0-r1.ebuild)
1332998397: >>> AUTOCLEAN: virtual/perl-Getopt-Long:0
1332998398: === (7 of 17) Post-Build Cleaning (virtual/perl-Getopt-Long-2.380.0-r1::/usr/portage/virtual/perl-Getopt-Long/perl-Getopt-Long-2.380.0-r1.ebuild)
1332998398: ::: completed emerge (7 of 17) virtual/perl-Getopt-Long-2.380.0-r1 to /
1332998399: >>> emerge (8 of 17) dev-tex/luatex-0.70.1 to /
1332998399: === (8 of 17) Cleaning (dev-tex/luatex-0.70.1::/usr/portage/dev-tex/luatex/luatex-0.7
使用grep命令选择有用的行。文件名pack
cat pack.log | grep ">>> emerge (" >> pack
文件形如:
1332998106: >>> emerge (2 of 17) dev-libs/zziplib-0.13.60-r1 to /
1332998160: >>> emerge (3 of 17) dev-tex/bibtexu-3.71_p20110705 to /
1332998233: >>> emerge (4 of 17) app-text/dvipsk-5.991_p20110705-r1 to /
1332998316: >>> emerge (5 of 17) app-text/ps2pkm-1.5_p20110705 to /
1332998379: >>> emerge (6 of 17) x11-proto/printproto-1.0.5 to /
1332998393: >>> emerge (7 of 17) virtual/perl-Getopt-Long-2.380.0-r1 to /
1332998399: >>> emerge (8 of 17) dev-tex/luatex-0.70.1 to /
1332998585: >>> emerge (9 of 17) x11-libs/libXp-1.0.1 to /
1332998605: >>> emerge (10 of 17) app-text/texlive-core-2011-r6 to /
1332999248: >>> emerge (11 of 17) dev-texlive/texlive-documentation-base-2011 to /
1332999255: >>> emerge (12 of 17) dev-texlive/texlive-basic-2011-r1 to /
1332999294: >>> emerge (13 of 17) dev-texlive/texlive-fontutils-2011 to /
1332999302: >>> emerge (14 of 17) dev-texlive/texlive-latex-2011 to /
1332999333: >>> emerge (15 of 17) dev-texlive/texlive-latexrecommended-2011 to /
1332999373: >>> emerge (16 of 17) virtual/latex-base-1.0 to /
1332999378: >>> emerge (17 of 17) app-vim/vim-latex-1.8.23.20110214 to /
1333027173: >>> emerge (1 of 13) app-admin/eselect-ruby-20100603 to /
1333027179: >>> emerge (2 of 13) app-text/teckit-2.5.1 to /
1333027254: >>> emerge (3 of 13) media-libs/silgraphite-2.3.1 to /
1333027347: >>> emerge (4 of 13) app-text/xdvipdfmx-0.7.8_p20100722 to /
1333027417: >>> emerge (5 of 13) app-text/texlive-core-2011-r6 to /
1333028348: >>> emerge (6 of 13) dev-lang/ruby-1.8.7_p357 to /
1333028497: >>> emerge (7 of 13) dev-texlive/texlive-latex-2011 to /
1333028526: >>> emerge (8 of 13) dev-texlive/texlive-fontsrecommended-2011 to /
1333028642: >>> emerge (9 of 13) dev-texlive/texlive-genericrecommended-2011 to /
1333028649: >>> emerge (10 of 13) dev-texlive/texlive-pictures-2011 to /
1333028670: >>> emerge (11 of 13) dev-texlive/texlive-latexextra-2011-r2 to /
1333028788: >>> emerge (12 of 13) dev-texlive/texlive-mathextra-2011 to /
1333028808: >>> emerge (13 of 13) dev-texlive/texlive-xetex-2011 to /
1333069989: >>> emerge (1 of 2) virtual/tex-base-0 to /
1333069998: >>> emerge (2 of 2) app-text/dvipdfmx-20110311 to /
1333105118: >>> emerge (1 of 1) dev-tex/cjk-latex-4.8.2 to /
1333108086: >>> emerge (1 of 24) app-text/t1utils-1.36 to /
1333108100: >>> emerge (2 of 24) dev-texlive/texlive-metapost-2011 to /
1333108113: >>> emerge (3 of 24) dev-texlive/texlive-texinfo-2011 to /
1333108121: >>> emerge (4 of 24) dev-texlive/texlive-langcyrillic-2011 to /
1333108170: >>> emerge (5 of 24) app-text/texi2html-1.78 to /
1333108182: >>> emerge (6 of 24) app-text/psutils-1.17 to /
1333108190: >>> emerge (7 of 24) app-text/ps2eps-1.64 to /
1333108196: >>> emerge (8 of 24) media-gfx/sam2p-0.47 to /
1333108235: >>> emerge (9 of 24) dev-texlive/texlive-htmlxml-2011 to /
1333108243: >>> emerge (10 of 24) dev-texlive/texlive-langenglish-2011 to /
1333108258: >>> emerge (11 of 24) media-libs/t1lib-5.1.2 to /
然后使用cut命令剪切软件包名称部分,保存到pack1
cut -d' ' -f8-9 pack >> pack1
卸载软件包的包的名称不能接软件的版本信息,只好手动删除了(汗......我也知道一句简单的命令可以搞定)
然后将回车符号全部替换为空格,最后得到pack2文件
形如:
dev-libs/zziplib-0.13.60-r1 dev-tex/bibtexu-3.71_p20110705 app-text/dvipsk-5.991_p20110705-r1 app-text/ps2pkm-1.5_p20110705 x11-pro /printpro -1.0.5 virtual/perl-Ge pt-Long-2.380.0-r1 dev-tex/luatex-0.70.1 x11-libs/libXp-1.0.1 app-text/texlive-core-2011-r6 dev-texlive/texlive-documentation-base-2011 dev-texlive/texlive-basic-2011-r1 dev-texlive/texlive-fontutils-2011 dev-texlive/texlive-latex-2011 dev-texlive/texlive-latexrecommended-2011 virtual/latex-base-1.0 app-vim/vim-latex-1.8.23.20110214 app-admin/eselect-ruby-20100603 app-text/teckit-2.5.1 media-libs/silgraphite-2.3.1 app-text/xdvipdfmx-0.7.8_p20100722 app-text/texlive-core-2011-r6 dev-lang/ruby-1.8.7_p357 dev-texlive/texlive-latex-2011 dev-texlive/texlive-fontsrecommended-2011 dev-texlive/texlive-genericrecommended-2011 dev-texlive/texlive-pictures-2011 dev-texlive/texlive-latexextra-2011-r2 dev-texlive/texlive-mathextra-2011 dev-texlive/texlive-xetex-2011 virtual/tex-base-0 app-text/dvipdfmx-20110311 dev-tex/cjk-latex-4.8.2 app-text/t1utils-1.36 dev-texlive/texlive-metapost-2011 dev-texlive/texlive-texinfo-2011 dev-texlive/texlive-langcyrillic-2011 app-text/texi2html-1.78 app-text/psutils-1.17 app-text/ps2eps-1.64 media-gfx/sam2p-0.47 dev-texlive/texlive-htmlxml-2011 dev-texlive/texlive-langenglish-2011 media-libs/t1lib-5.1.2 dev-tex/xcolor-2.11 dev-tex/xmltex-1.9-r2 app-text/xdvik-22.84.16 media-libs/freetype-1.4_pre20080316-r2 app-text/lcdf-type ols-2.91 dev-tex/feynmf-1.08-r3 media-libs/gd-2.0.35-r3 virtual/texi2dvi-0 app-text/dvipng-1.14 app-text/passivetex-1.25 dev-tex/pgf-2.10 dev-tex/latex-beamer-3.11 app-text/texlive-2011
这样使用命令emerge -C 然后粘贴包名到控制台即可。软件包彻底移除。
分享到:
相关推荐
Gentoo Linux文档 -- Gentoo Linux x86手册
介绍gentoo搭建方法,让你了解gentoo的总体架构,以及安装方法。
Gentoo的手册,中文,对安装和研究linux很有帮助。 gentoo是很独特的发行版,和其他不同,安装需要手动一步步进行,软件安装也类似freebsd的port方式。具有高度定制性。
Gentoo Linux-个人门户覆盖 如何将此叠加层与本地叠加层一起使用: 应该通过/etc/portage/repos.conf/进行管理。 要启用此覆盖,请确保您使用的是最新的Portage版本(至少为2.2.14 ),并创建一个/etc/portage/...
Portage是一套真正的自动导入系统,然而Gentoo里的Portage是用Python编写的,并且它具有很多先进的特性, 包括文件依赖、精细的包管理、OpenBSD风格的虚拟安装,安全卸载,系统框架文件、虚拟软件包、配置文件管理...
gentoo-portage-rsync-mirror, Gentoo库的镜像镜像,使用 https 以前的Gentoo rsync-to-git镜像用于包含打包到git存储库中的Gentoo树的存储库。 然而,在 2015-08-09,Gentoo正式切换到了 git,这使得。新资源:cgit...
修补程序文件,用于在Linux内核4.0.4上构建Gentoo的vmware-modules-279.3软件包。 使程序包编译无误,并允许vmware-player运行。 使用风险自负。 指示: 手动克隆存储库或单独下载文件。 在终端中,将补丁文件放在...
手册会告诉你如何一步一步安装Gentoo Linux,在这个过程中,你会进一步了解linux!学到很多知识!
在sun服务器上安装gentoo linux 2007 目前sun服务器只能安装gentoo debian
这也是为什么Gentoo适合比较有Linux使用经验的老手使用的原因。但是要注意的是,由于编译软件需要消耗大量的时间,所以如果你所有的软件都自己编译,并安装KDE桌面系统等比较大的软件包,可能需要几天时间才能编译完...
Gentoo Linux 安装手册, Gentoo Linux安装完整教程, 内容详细, 包你一次就会, 绝对精彩. Gentoo Linux 安装手册完整教程!
Gentoo Linux 安装笔记 Gentoo Linux 安装笔记 Gentoo Linux 安装笔记
在Gentoo Linux下绘制高质量的PostScript矢量图形.pdf
随意提出拉取请求以获取任何程序包的所有权(我仍将进行审查和合并),如果您想成为gentoo-monero组织的成员,则可以提出问题。 入门 eselect-repository # Install eselect-repository, if you don't already ...
gentoo-kernel-guide:在Gentoo Linux上配置和管理内核的更好方法
Gentoo Linux nVidia指南
gentoo-pxe-builder目的此PXE构建器的目的是让您从PXE引导计算机,然后自动对其进行设置,以便可以使用SSH远程访问它。 引导此PXE initramfs将显示有关PXE主机上可用网络接口的信息,因此您无需键入任何命令即可连接...
gentoo-ohmyzsh 该插件添加了一些别名和功能,可用于Gentoo Linux 特征 出现 别名 命令 描述 同步 须藤涌现--sync 将本地存储库与远程存储库同步 升级 须藤新兴-aDuN世界 更新本地系统中的软件包 干净的 须藤新兴-...
gentoolinux安装教程
Gentoo Linux 2008 x86手册(安装) Gentoo Linux 2008 x86手册(安装)