可能重复:
apt-get 更新列表的大小太大
在 Ubuntu 12.04 中,每次运行都会获取以下软件包sudo apt-get update
。亲爱的 ubuntu 专家,请告诉我如何停止这种情况。
ranjeet@ubuntu:~$ sudo apt-get update
Ign http://dl.google.com stable InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Get:1 http://dl.google.com stable Release.gpg [198 B]
Ign http://security.ubuntu.com precise-security InRelease
Ign http://archive.ubuntu.com precise InRelease
Ign http://archive.ubuntu.com precise-updates InRelease
Ign http://ppa.launchpad.net precise InRelease
Ign http://ppa.launchpad.net precise InRelease
Get:2 http://dl.google.com stable Release [1,347 B]
Ign http://ppa.launchpad.net precise Release.gpg
Get:3 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:4 http://archive.ubuntu.com precise Release.gpg [198 B]
Hit http://ppa.launchpad.net precise Release.gpg
Ign http://ppa.launchpad.net precise Release.gpg
Hit http://ppa.launchpad.net precise Release.gpg
Get:5 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:6 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://ppa.launchpad.net precise Release.gpg
Get:7 http://archive.ubuntu.com precise Release [49.6 kB]
Ign http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Hit http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise/main TranslationIndex
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:8 http://security.ubuntu.com precise-security/restricted Sources [14 B]
Hit http://ppa.launchpad.net precise/main Sources
Get:9 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main amd64 Packages
Get:10 http://security.ubuntu.com precise-security/universe Sources [4,522 B]
Get:11 http://security.ubuntu.com precise-security/multiverse Sources [696 B]
Get:12 http://security.ubuntu.com precise-security/main Sources [12.6 kB]
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main amd64 Packages
Get:13 http://security.ubuntu.com precise-security/restricted amd64 Packages [14 B]
Get:14 http://security.ubuntu.com precise-security/universe amd64 Packages [10.3 kB]
Get:15 http://security.ubuntu.com precise-security/multiverse amd64 Packages [1,142 B]
Get:16 http://security.ubuntu.com precise-security/main amd64 Packages [42.8 kB]
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Get:17 http://archive.ubuntu.com precise/restricted Sources [5,470 B]
Get:18 http://archive.ubuntu.com precise/universe Sources [5,019 kB]
Get:19 http://security.ubuntu.com precise-security/restricted i386 Packages [14 B]
Get:20 http://security.ubuntu.com precise-security/universe i386 Packages [10.3 kB]
Get:21 http://dl.google.com stable/main amd64 Packages [1,238 B]
Get:22 http://security.ubuntu.com precise-security/multiverse i386 Packages [1,393 B]
Get:23 http://security.ubuntu.com precise-security/main i386 Packages [43.9 kB]
Get:24 http://dl.google.com stable/main i386 Packages [1,248 B]
Ign http://dl.google.com stable/main TranslationIndex
Err http://ppa.launchpad.net precise/main Sources
404 Not Found
Err http://ppa.launchpad.net precise/main amd64 Packages
404 Not Found
Err http://ppa.launchpad.net precise/main i386 Packages
404 Not Found
Err http://ppa.launchpad.net precise/main Sources
404 Not Found
Err http://ppa.launchpad.net precise/main amd64 Packages
404 Not Found
Err http://ppa.launchpad.net precise/main i386 Packages
404 Not Found
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Hit http://security.ubuntu.com precise-security/universe Translation-en
Get:25 http://archive.ubuntu.com precise/multiverse Sources [155 kB]
Get:26 http://archive.ubuntu.com precise/main Sources [934 kB]
Get:27 http://archive.ubuntu.com precise/restricted amd64 Packages [8,452 B]
Get:28 http://archive.ubuntu.com precise/universe amd64 Packages [4,786 kB]
Get:29 http://archive.ubuntu.com precise/multiverse amd64 Packages [119 kB]
Get:30 http://archive.ubuntu.com precise/main amd64 Packages [1,273 kB]
Get:31 http://archive.ubuntu.com precise/restricted i386 Packages [8,431 B]
Get:32 http://archive.ubuntu.com precise/universe i386 Packages [4,796 kB]
Get:33 http://archive.ubuntu.com precise/multiverse i386 Packages [121 kB]
Get:34 http://archive.ubuntu.com precise/main i386 Packages [1,274 kB]
Hit http://archive.ubuntu.com precise/main TranslationIndex
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Get:35 http://archive.ubuntu.com precise-updates/restricted Sources [1,379 B]
Get:36 http://archive.ubuntu.com precise-updates/universe Sources [14.7 kB]
Get:37 http://archive.ubuntu.com precise-updates/multiverse Sources [696 B]
Get:38 http://archive.ubuntu.com precise-updates/main Sources [47.9 kB]
Get:39 http://archive.ubuntu.com precise-updates/restricted amd64 Packages [2,417 B]
Get:40 http://archive.ubuntu.com precise-updates/universe amd64 Packages [37.1 kB]
Get:41 http://archive.ubuntu.com precise-updates/multiverse amd64 Packages [1,142 B]
Get:42 http://archive.ubuntu.com precise-updates/main amd64 Packages [120 kB]
Get:43 http://archive.ubuntu.com precise-updates/restricted i386 Packages [2,439 B]
Get:44 http://archive.ubuntu.com precise-updates/universe i386 Packages [37.6 kB]
Get:45 http://archive.ubuntu.com precise-updates/multiverse i386 Packages [1,393 B]
Get:46 http://archive.ubuntu.com precise-updates/main i386 Packages [121 kB]
Hit http://archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://archive.ubuntu.com precise/main Translation-en
Hit http://archive.ubuntu.com precise/multiverse Translation-en
Hit http://archive.ubuntu.com precise/restricted Translation-en
Hit http://archive.ubuntu.com precise/universe Translation-en
Hit http://archive.ubuntu.com precise-updates/main Translation-en
Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://archive.ubuntu.com precise-updates/universe Translation-en
Fetched 19.2 MB in 8min 59s (35.5 kB/s)
答案1
我认为你不明白 main 和 universe 是什么。它们不是包,而是可用包的列表。
运行sudo apt-get update
会下载这些包列表,但您必须运行sudo apt-get upgrade
才能实际安装可用的更新。
因此,始终更新主包和 Universe 包列表至关重要。但是下载量不应达到 13MB - 您的问题实际上是此问题的重复:apt-get 更新列表的大小太大 。
答案2
编辑:问题已编辑,因此回答此问题
创建 shell 脚本,
gksudo gedit /usr/bin/update-apt
将下面的脚本粘贴到 gedit 中,获取文件名XXXX
并XXX
按照/var/lib/apt/lists/
脚本中的注释进行操作(在我的例子中,这些文件的大小较大,为 natty 9 和 28 MB)。
#!/bin/bash
sudo touch /var/lib/apt/lists/XXXX # XXXX means full name of file ending with '_main_binary-i386_Packages'
sudo touch /var/lib/apt/lists/XXX # XXX means full name of file ending with '_universe_binary-i386_Packages'
sudo apt-get update
授予执行权限
sudo chmod +x /usr/bin/update-apt
现在,无论何时您想sudo apt-get update
尝试update-apt
。
你做到了。
这是针对第一个未经编辑的问题给出的答案
点击Alt+F2并运行software-properties-gtk
。或打开Software Sources
取消勾选即可
Canonical-supported Open Source software (main)
Community-maintained open Source software (universe)
然后击close
然后击reload
就是这样。