小编Del*_*ted的帖子

列出 APT 中已安装包的(递归)依赖项

对于我安装的每个包,我想知道如果卸载它会安装哪些包。我需要的输出示例是 ( package: list of deps):

abc: foo bar
bcd: baz abc
bdd: baz fuubar
Run Code Online (Sandbox Code Playgroud)

附加

如果我检查如果我ppp使用apt-get以下方法删除包,真的会删除什么:

$ echo $(apt-get --dry-run remove ppp | grep '^Remv ' | cut -d' ' -f2)
gnome-ppp mint-meta-xfce network-manager-pptp-gnome network-manager-pptp wvdial pppoeconf pppoe pptp-linux pppconfig ppp
Run Code Online (Sandbox Code Playgroud)

我看到它与apt-cacheshow 给我的不同(我认为不包括递归依赖项):

$ apt-cache show ppp | grep '^Breaks: '
Breaks: network-manager (<= 0.8.0.999-1), network-manager-pptp (<= 0.8.0.999-1), pppdcapiplugin (<= 1:3.9.20060704+dfsg.1-1)
Run Code Online (Sandbox Code Playgroud)

附加 2

是否dpkg --get-selections | cut -f1有一种可靠的方法来获取要迭代的已安装软件包列表?

apt

19
推荐指数
2
解决办法
1万
查看次数

阻止在 APT 中卸载软件包

简而言之,我希望能够设置包,abc以便:

  1. apt-get remove abc 应该失败。
  2. apt-get purge abc 应该失败。
  3. apt-get upgrade abc 应该管用。

如果包依赖项发生变化,因此abc应该在dist-upgrade我很高兴被迫做某事然后dist-upgrade再次卸载。

apt

10
推荐指数
1
解决办法
4007
查看次数

列出 APT 中已安装的元包

元包是自己不安装任何东西,而是依赖于其他包的包。如何列出系统上已安装的元软件包?

apt

7
推荐指数
2
解决办法
7443
查看次数

XDG 用户目录

安装 Linux Mint Debian 版本后,我的 .config/user-dirs.dirs 如下所示:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
Run Code Online (Sandbox Code Playgroud)

这个想法是应用程序应该能够为不同类型的内容找到合适的目录,同时仍然可以让用户选择目录名称(例如,用户可能希望对其进行本地化)。例如,$(xdg-user-dir DESKTOP)如果定义了桌面文件,则Gnome …

configuration directory-structure freedesktop

6
推荐指数
1
解决办法
5175
查看次数