ฉันจะลบรายการการแปลใน 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 repos จริงกับ 169 เช็ค)

คำตอบ:


68

หากต้องการปิดใช้งานการดาวน์โหลดการแปลให้สร้างไฟล์ที่มีชื่อ/etc/apt/apt.conf.d/99translations& วางดังต่อไปนี้:

Acquire::Languages "none";

คุณอาจต้องลบไฟล์แปลที่มีอยู่ใน / var / lib / apt / list /

สำหรับข้อมูลเพิ่มเติมดู man page เพื่อ apt.conf (5)


สิ่งนี้ทำงานเพื่อรับรายการส่วนใหญ่ แต่รายการที่มี TranslationIndex ยังคงปรากฏอยู่ ความคิดใด ๆ วิธีการลบเหล่านั้นหรือไม่
โธมัสวอร์ด

2
ดูเหมือนว่าจะเป็นbugs.debian.org/cgi-bin/bugreport.cgi?bug=624218ซึ่งควรได้รับการแก้ไขในเวอร์ชัน apt ในเวลา 11.10
ajmitch

1
backport ใด ๆ ของมัน?
โธมัสวอร์ด

สมบูรณ์แบบ ..... สิ่งเหล่านั้นจะไม่ปรากฏในการแปลapt-get updateอีกต่อไป
Rakib

1
นี้สำหรับ apt_preferences หรือ apt.conf? ดูเหมือนว่าคำตอบนี้จะสับสนเล็กน้อย
Jayen

10

เพียงบันทึก (เนื่องจากบางคนจะเดินทางบนนี้ .. ) ไฟล์ 99Translations ข้างต้นจะทำให้ barf - ลบ "แพคเกจ: *" บรรทัด - เพียงหนึ่งบรรทัดก็พอ:

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)
blueyed

สิ่งนี้ยังคงช่วยใน Ubuntu 18.04 อยู่ใช่ไหม
rubo77

0

พบสิ่งนี้ในขณะที่ฉันกำลังค้นหาวิธีแก้ปัญหาด้วย เป็นการติดตั้งใหม่ของการทดสอบ Debian คำสั่งดังต่อไปนี้ (ตามที่แนะนำข้างต้น) แก้ไขมัน:

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

ทดสอบกับระบบ Natty นี่ไม่ได้แก้ไขปัญหาใน Natty อย่างไรก็ตามเนื่องจากฉันได้อัปเกรดระบบหลักเป็น Precise ฉันไม่มีปัญหานี้: P
Thomas Ward

-1

ไปที่การสนับสนุนภาษาจากนั้นคลิกติดตั้ง / ลบภาษา ...จากนั้นยกเลิกการเลือกภาษาที่คุณไม่ต้องการ

หากคุณลบทุกภาษาภาษานั้นจะเริ่มต้นเป็นภาษาอังกฤษทั่วไป โปรดทราบว่าแพ็คเกจในสหรัฐฯถือเป็นภาษาอื่นดังนั้นคุณต้องยกเลิกการเลือกภาษาอังกฤษเพื่อถอนการติดตั้งแพ็คเกจ


ใช้ได้เฉพาะใน GUI เท่านั้น สิ่งนี้ยังไม่หยุดการแปลจากการรวบรวมโดย apt-get หรือ aptitude ในรุ่นเก่าเหล่านั้น
โธมัสวอร์ด
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.