首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何创建测试后删除的已安装软件包列表?

如何创建测试后删除的已安装软件包列表?
EN

Ask Ubuntu用户
提问于 2011-11-12 07:23:57
回答 5查看 707关注 0票数 0

我喜欢测试kmymoney。当尝试安装时,有很多kde软件包是这个程序所需要的。没关系,我使用的是联合,目前还没有安装kde包。那么,当我喜欢删除所有这些包后,测试kmymoney,我如何做到这一点?

代码语言:javascript
运行
复制
sudo apt-get install kmymoney >> /some/folder/kmymoney.txt

给我apt的输出,但这不是我要找的。有办法正确地移除这个包吗?

事先鸣谢

W。

EN

回答 5

Ask Ubuntu用户

发布于 2011-11-12 07:38:02

您可以在安装软件包之前和之后使用dpkg -l。此命令列出安装在计算机上的软件包。

将输出保存在两个文件中,然后可以使用diffawk的组合进行比较,以便提取安装新包时安装的包列表。

票数 1
EN

Ask Ubuntu用户

发布于 2011-11-12 09:49:12

我在用

我使用日志保存来保存自己的日志。

代码语言:javascript
运行
复制
man logsave

NAME
       logsave - save the output of a command in a logfile

SYNOPSIS
       logsave [ -asv ] logfile cmd_prog [ ... ]

DESCRIPTION
       The  logsave  program  will execute cmd_prog with the specified argument(s),
       and save a copy of its output to logfile. If the containing directory for 
       logfile does not exist, logsave will accumulate the output in memory until 
       it  can  be written out.  A copy of the output will also be written to 
       standard output.

示例

安装规划师时:

代码语言:javascript
运行
复制
logsave 2011110800_Install_planner.txt sudo apt-get install planner

2011110800_Install_planner.txt有:

代码语言:javascript
运行
复制
Log of sudo apt-get install planner 
Tue Nov  8 17:51:19 2011

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  gconf2 gconf2-common libart-2.0-2 libgconf2-4 libglade2-0 libgnomecanvas2-0
  libgnomecanvas2-common libgtk-3-0 libgtk-3-bin libgtk-3-common librarian0
  rarian-compat scrollkeeper
Suggested packages:
  gconf-defaults-service librsvg2-common gvfs
The following NEW packages will be installed:
  gconf2 gconf2-common libart-2.0-2 libgconf2-4 libglade2-0 libgnomecanvas2-0
  libgnomecanvas2-common libgtk-3-0 libgtk-3-bin libgtk-3-common librarian0
  planner rarian-compat scrollkeeper
0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,385 kB of archives.
After this operation, 18.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?

删除(从2011110800_Install_planner.txt复制和粘贴已安装的包)

代码语言:javascript
运行
复制
logsave 2011110800_Remove_planner.txt sudo apt-get purge gconf2 gconf2-common libart-2.0-2 libgconf2-4 libglade2-0 libgnomecanvas2-0 libgnomecanvas2-common libgtk-3-0 libgtk-3-bin libgtk-3-common librarian0 planner rarian-compat scrollkeeper

2011110800_Remove_planner.txt有:

代码语言:javascript
运行
复制
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  gconf2* gconf2-common* libart-2.0-2* libgconf2-4* libglade2-0*
  libgnomecanvas2-0* libgnomecanvas2-common* libgtk-3-0* libgtk-3-bin*
  libgtk-3-common* librarian0* planner* rarian-compat* scrollkeeper*
0 upgraded, 0 newly installed, 14 to remove and 0 not upgraded.
After this operation, 18.2 MB disk space will be freed.
Do you want to continue [Y/n]? 

与gui

Synaptic和Muon包管理器保存历史日志或解析apt/dpkg日志。

日志

从dpkg日志中检查已安装/更新/删除的包(命令行):

最近的状态日志:

代码语言:javascript
运行
复制
grep "status installed" /var/log/dpkg.log

grep upgrade /var/log/dpkg.log

grep remove /var/log/dpkg.log

更早/更多:如何完全删除桌面?

票数 1
EN

Ask Ubuntu用户

发布于 2011-11-12 11:32:46

你为什么不直接卸载金币呢?我不知道你说“恰当”是什么意思,但正如其他答案所解释的那样,你可以在这方面同时使用天资或apt。

代码语言:javascript
运行
复制
sudo apt-get remove kymymoney
sudo apt-get autoremove

代码语言:javascript
运行
复制
sudo aptitude remove kymymoney

将正确地删除包及其未使用的依赖项。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/78447

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档