应该在sources.list文件中注释掉哪些行?

我上周末刚从Ubuntu 12.04更新到14.04。 我还没有下载任何额外的程序。 我查看了sources.list文件,其中包含以下几行:

deb http:"//gb.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse # deb http:"//security.archive.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse # deb http:"//archive.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse 

我担心安全线被注释掉了。 我知道这是一个旧版本,但我想知道是否应该有更新版本的这一行没有被注释掉?

可以从sources.list中删除与旧版本相关的任何内容。

在升级过程中,旧版本将被注释掉(通过添加“#”)。

但是我想知道是否应该有更新版本的这一行没有被注释掉?

这取决于软件和更新中检查的内容。 如果未选中安全性,则不需要额外的一行(尽管我希望它可以存在,但会被注释掉)。

这是一个示例/etc/apt/sources.list文件,我刚刚从可信任的备用版本中找到了。 我继续将安全更新放在顶部,删除了评论和“deb-src”条目。

 deb http://security.ubuntu.com/ubuntu trusty-security main restricted deb http://security.ubuntu.com/ubuntu trusty-security universe deb http://security.ubuntu.com/ubuntu trusty-security multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb http://us.archive.ubuntu.com/ubuntu/ trusty universe deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse 

或者,您可以只编辑当前列表,如下所示:

 deb http://gb.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse deb http://security.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse