升级软件包后,我的系统无法再启动。如何从终端列出上次更新的软件包以恢复更改?或者有没有更简单的方法来恢复最新升级?
答案1
列出通过任何方法(apt-get、软件中心……)安装的最近安装的软件包的命令:
cat /var/log/dpkg.log | grep "\ install\ "
示例输出:
2010-12-08 15:48:14 install python-testtools <none> 0.9.2-1
2010-12-08 15:48:16 install quickly-widgets <none> 10.09
2010-12-08 22:21:31 install libobasis3.3-sdk <none> 3.3.0-17
2010-12-09 12:00:24 install mc <none> 3:4.7.0.6-1
2010-12-09 23:32:06 install oggconvert <none> 0.3.3-1ubuntu1
2010-12-09 23:34:50 install mpg123 <none> 1.12.1-3ubuntu1
2010-12-09 23:34:52 install dir2ogg <none> 0.11.8-1
2010-12-09 23:34:53 install faad <none> 2.7-4
2010-12-09 23:34:54 install wavpack <none> 4.60.1-1
2010-12-10 11:53:00 install playonlinux <none> 3.8.6
列出历史记录的命令
apt-get
(注意:这不列出已安装的依赖项,它仅列出以前apt-get
运行的命令):
cat /var/log/apt/history.log | grep "\ install\ "
示例输出:
Commandline: apt-get install libindicate-doc
Commandline: apt-get install googlecl
Commandline: apt-get --reinstall install ttf-mscorefonts-installer
Commandline: apt-get install valac libvala-0.10-dev
Commandline: apt-get install libgtksourceview-dev
Commandline: apt-get install python-sphinx
Commandline: apt-get install python-epydoc
Commandline: apt-get install quickly-widgets
Commandline: apt-get install libreoffice3* libobasis3.3*
Commandline: apt-get install mc