如何删除apt中的翻译条目?


55

这是输出aptitude update

Ign http://archive.canonical.com natty InRelease
Ign http://extras.ubuntu.com natty InRelease
Ign http://dl.google.com stable InRelease
Ign http://security.ubuntu.com natty-security InRelease
Hit http://deb.torproject.org natty InRelease
Get:1 http://dl.google.com stable Release.gpg [198 B]
Ign http://us.archive.ubuntu.com natty InRelease
Ign http://us.archive.ubuntu.com natty-updates InRelease
Hit http://archive.canonical.com natty Release.gpg
Hit http://extras.ubuntu.com natty Release.gpg
Hit http://security.ubuntu.com natty-security Release.gpg
Hit http://us.archive.ubuntu.com natty Release.gpg
Hit http://security.ubuntu.com natty-security Release
Hit http://archive.canonical.com natty Release
Hit http://extras.ubuntu.com natty Release
Get:2 http://dl.google.com stable Release [1,338 B]
Hit http://us.archive.ubuntu.com natty-updates Release.gpg
Hit http://security.ubuntu.com natty-security/main Sources
Hit http://archive.canonical.com natty/partner amd64 Packages
Hit http://deb.torproject.org natty/main amd64 Packages
Hit http://extras.ubuntu.com natty/main Sources
Hit http://us.archive.ubuntu.com natty Release
Hit http://security.ubuntu.com natty-security/restricted Sources
Hit http://security.ubuntu.com natty-security/universe Sources
Hit http://security.ubuntu.com natty-security/multiverse Sources
Hit http://security.ubuntu.com natty-security/main amd64 Packages
Hit http://security.ubuntu.com natty-security/restricted amd64 Packages
Ign http://archive.canonical.com natty/partner TranslationIndex
Hit http://extras.ubuntu.com natty/main amd64 Packages
Ign http://extras.ubuntu.com natty/main TranslationIndex
Hit http://security.ubuntu.com natty-security/universe amd64 Packages
Hit http://security.ubuntu.com natty-security/multiverse amd64 Packages
Ign http://security.ubuntu.com natty-security/main TranslationIndex
Ign http://security.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://security.ubuntu.com natty-security/restricted TranslationIndex
Ign http://deb.torproject.org natty/main TranslationIndex
Ign http://security.ubuntu.com natty-security/universe TranslationIndex
Hit http://us.archive.ubuntu.com natty-updates Release
Hit http://us.archive.ubuntu.com natty/main Sources
Hit http://us.archive.ubuntu.com natty/restricted Sources
Hit http://us.archive.ubuntu.com natty/universe Sources
Hit http://us.archive.ubuntu.com natty/multiverse Sources
Hit http://us.archive.ubuntu.com natty/main amd64 Packages
Hit http://us.archive.ubuntu.com natty/restricted amd64 Packages
Hit http://us.archive.ubuntu.com natty/universe amd64 Packages
Hit http://us.archive.ubuntu.com natty/multiverse amd64 Packages
Ign http://us.archive.ubuntu.com natty/main TranslationIndex
Ign http://us.archive.ubuntu.com natty/multiverse TranslationIndex
Ign http://us.archive.ubuntu.com natty/restricted TranslationIndex
Ign http://us.archive.ubuntu.com natty/universe TranslationIndex
Hit http://us.archive.ubuntu.com natty-updates/main Sources
Hit http://us.archive.ubuntu.com natty-updates/restricted Sources
Hit http://us.archive.ubuntu.com natty-updates/universe Sources
Get:3 http://dl.google.com stable/main amd64 Packages [469 B]
Ign http://dl.google.com stable/main TranslationIndex
Hit http://us.archive.ubuntu.com natty-updates/multiverse Sources
Hit http://us.archive.ubuntu.com natty-updates/main amd64 Packages
Hit http://us.archive.ubuntu.com natty-updates/restricted amd64 Packages
Hit http://us.archive.ubuntu.com natty-updates/universe amd64 Packages
Hit http://us.archive.ubuntu.com natty-updates/multiverse amd64 Packages
Ign http://us.archive.ubuntu.com natty-updates/main TranslationIndex
Ign http://us.archive.ubuntu.com natty-updates/multiverse TranslationIndex
Ign http://us.archive.ubuntu.com natty-updates/restricted TranslationIndex
Ign http://us.archive.ubuntu.com natty-updates/universe TranslationIndex
Ign http://archive.canonical.com natty/partner Translation-en_US
Ign http://extras.ubuntu.com natty/main Translation-en_US
Ign http://extras.ubuntu.com natty/main Translation-en
Ign http://archive.canonical.com natty/partner Translation-en
Ign http://security.ubuntu.com natty-security/main Translation-en_US
Ign http://security.ubuntu.com natty-security/main Translation-en
Ign http://security.ubuntu.com natty-security/multiverse Translation-en_US
Ign http://security.ubuntu.com natty-security/multiverse Translation-en
Ign http://security.ubuntu.com natty-security/restricted Translation-en_US
Ign http://security.ubuntu.com natty-security/restricted Translation-en
Ign http://security.ubuntu.com natty-security/universe Translation-en_US
Ign http://security.ubuntu.com natty-security/universe Translation-en
Ign http://ppa.launchpad.net natty InRelease
Ign http://ppa.launchpad.net natty InRelease
Ign http://ppa.launchpad.net natty InRelease
Ign http://ppa.launchpad.net natty InRelease
Ign http://ppa.launchpad.net natty InRelease
Hit http://ppa.launchpad.net natty Release.gpg
Hit http://ppa.launchpad.net natty Release.gpg
Hit http://ppa.launchpad.net natty Release.gpg
Hit http://ppa.launchpad.net natty Release.gpg
Hit http://ppa.launchpad.net natty Release.gpg
Hit http://ppa.launchpad.net natty Release
Ign http://dl.google.com stable/main Translation-en_US
Hit http://ppa.launchpad.net natty Release
Hit http://ppa.launchpad.net natty Release
Hit http://ppa.launchpad.net natty Release
Hit http://ppa.launchpad.net natty Release
Ign http://dl.google.com stable/main Translation-en
Hit http://ppa.launchpad.net natty/main Sources
Hit http://ppa.launchpad.net natty/main amd64 Packages
Ign http://ppa.launchpad.net natty/main TranslationIndex
Hit http://ppa.launchpad.net natty/main Sources
Hit http://ppa.launchpad.net natty/main amd64 Packages
Ign http://ppa.launchpad.net natty/main TranslationIndex
Hit http://ppa.launchpad.net natty/main Sources
Hit http://ppa.launchpad.net natty/main amd64 Packages
Ign http://ppa.launchpad.net natty/main TranslationIndex
Hit http://ppa.launchpad.net natty/main Sources
Hit http://ppa.launchpad.net natty/main amd64 Packages
Ign http://ppa.launchpad.net natty/main TranslationIndex
Hit http://ppa.launchpad.net natty/main Sources
Ign http://us.archive.ubuntu.com natty/main Translation-en_US
Ign http://us.archive.ubuntu.com natty/main Translation-en
Hit http://ppa.launchpad.net natty/main amd64 Packages
Ign http://ppa.launchpad.net natty/main TranslationIndex
Ign http://us.archive.ubuntu.com natty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com natty/multiverse Translation-en
Ign http://us.archive.ubuntu.com natty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com natty/restricted Translation-en
Ign http://us.archive.ubuntu.com natty/universe Translation-en_US
Ign http://us.archive.ubuntu.com natty/universe Translation-en
Ign http://us.archive.ubuntu.com natty-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com natty-updates/main Translation-en
Ign http://us.archive.ubuntu.com natty-updates/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com natty-updates/multiverse Translation-en
Ign http://us.archive.ubuntu.com natty-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com natty-updates/restricted Translation-en
Ign http://us.archive.ubuntu.com natty-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com natty-updates/universe Translation-en
Ign http://ppa.launchpad.net natty/main Translation-en_US
Ign http://ppa.launchpad.net natty/main Translation-en
Ign http://ppa.launchpad.net natty/main Translation-en_US
Ign http://ppa.launchpad.net natty/main Translation-en
Ign http://archive.getdeb.net natty-getdeb InRelease
Ign http://ppa.launchpad.net natty/main Translation-en_US
Ign http://ppa.launchpad.net natty/main Translation-en
Ign http://ppa.launchpad.net natty/main Translation-en_US
Ign http://ppa.launchpad.net natty/main Translation-en
Ign http://ppa.launchpad.net natty/main Translation-en_US
Ign http://ppa.launchpad.net natty/main Translation-en
Hit http://archive.getdeb.net natty-getdeb Release.gpg
Hit http://archive.getdeb.net natty-getdeb Release
Ign http://deb.torproject.org natty/main Translation-en_US
Ign http://deb.torproject.org natty/main Translation-en
Hit http://archive.getdeb.net natty-getdeb/apps amd64 Packages
Ign http://archive.getdeb.net natty-getdeb/apps TranslationIndex
Ign http://archive.getdeb.net natty-getdeb/apps Translation-en_US
Ign http://archive.getdeb.net natty-getdeb/apps Translation-en
Fetched 2,005 B in 45s (44 B/s)
Reading package lists...

有什么办法可以摆脱翻译问题?我已经厌倦了它导致大量的存储库检查,而不是检查更少的存储库(69个实际存储库与169个检查)

Answers:


68

要禁用下载翻译,请创建一个名为/etc/apt/apt.conf.d/99translations&的文件,并在其中添加以下内容:

Acquire::Languages "none";

您可能还需要删除/ var / lib / apt / lists /中的现有翻译文件

有关更多信息,请参见apt.conf(5)的手册页。


这样做可以获取大多数项目,但是带有TranslationIndex的条目仍在显示。任何想法如何删除那些?
托马斯·沃德

2
这看起来像是bugs.debian.org/cgi-bin/bugreport.cgi?bug=624218,应该在11.10版的apt版本中修复
2011年

1
它有什么支持吗?
托马斯·沃德

完美.....这些翻译不再显示apt-get update
Rakib '04

1
这是apt_preferences还是apt.conf?看起来这个答案有点混乱。
Jayen 2013年

10

仅作记录之用(因为有些文件可能会跳出来..)上面的99Translations文件将导致barf-删除“ Packages:*”行-仅一行就足够了:

Acquire::Languages "none";

另外,apt仍将检索您的语言环境/语言的文件。


如果您使用的是Ubuntu 12.x,则要禁用apt来检索pkg翻译
Flint

1
sudo rm -r /var/lib/apt/lists/*Translation*此后不要忘记发出命令以删除所有现有的翻译索引文件
Flint

5

启用管道以批处理这些请求,这快得多:

Acquire::http { Pipeline-Depth "200"; }

但是根据我的经验,它可能会导致下载中断。http错误代码似乎会级联。如果您正在与apt-cacher-ng(镜像模式或代理模式)通信,它应该足够安全。否则,如果您的镜子坏了,请准备禁用它。

我建议不要将语言设置为none,因为它会打乱apt-cache search(当有用的搜索需要至少一种语言的描述时,没有意思就是没有)。基于语言环境的默认值包括不必要的区域变体,但类似这样:

Acquire::Languages { "fr"; "en"; };

是合理的。


对我而言,它不会中断apt-cache search(Ubuntu 13.10)。
2014年

这在Ubuntu 18.04中仍然有帮助吗?
rubo77

0

我也在寻找解决方案时发现了这一点。是全新安装的Debian测试。以下命令(如上所述)对其进行了修复:

sudo rm -r /var/lib/apt/lists/*

在Natty系统上测试。这不能解决Natty中的问题。但是,由于我已经将主系统升级到了精确系统,所以我没有这个问题:P
Thomas Ward

-1

转到“ 语言支持”,然后单击“ 安装/删除语言...”,然后取消选中不需要的语言。

如果您删除了所有语言,则默认为通用英语。请注意,en-US软件包被视为一种单独的语言,因此您必须取消选中英语以卸载其软件包。


这仅适用于GUI。这也不会阻止apt-get或aptitude在这些旧版本中收集翻译。
托马斯·沃德
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.