Ubuntu点滴--apt-get update和upgrade的作用
update
update is used to resynchronize the package index files from their
sources. The indexes of available packages are fetched from the
location(s) specified in /etc/apt/sources.list. For example, when
using a Debian archive, this command retrieves and scans the
Packages.gz files, so that information about new and updated
packages is available. An update should always be performed before
an upgrade or dist-upgrade. Please be aware that the overall
progress meter will be incorrect as the size of the package files
cannot be known in advance. upgrade
upgrade is used to install the newest versions of all packages
currently installed on the system from the sources enumerated in
/etc/apt/sources.list. Packages currently installed with new
versions available are retrieved and upgraded; under no
circumstances are currently installed packages removed, or packages
not already installed retrieved and installed. New versions of
currently installed packages that cannot be upgraded without
changing the install status of another package will be left at
their current version. An update must be performed first so that
apt-get knows that new versions of packages are available. dist-upgrade
dist-upgrade in addition to performing the function of upgrade,
also intelligently handles changing dependencies with new versions
of packages; apt-get has a "smart" conflict resolution system, and
it will attempt to upgrade the most important packages at the
expense of less important ones if necessary. The dist-upgrade
command may therefore remove some packages. The
/etc/apt/sources.list file contains a list of locations from which
to retrieve desired package files. See also apt_preferences(5) for
a mechanism for overriding the general settings for individual
packages. 上面的内容是从apt-get的man文档中摘录出来的。上面表达的意思就是,update的作用是从/etc/apt/source.list文件中定义的源中去同步包的索引文件,即运行这个命令其实并没有更新软件,而是相当于windows下面的检查更新,获取的是软件的状态。 而upgrade则是更据update命令同步好了的包的索引文件,去真正地更新软件。 而dist-upgrade则是更聪明的upgrade,man文档中说它以更聪明的方式来解决更新过程中出现的软件依赖问题,它也是从/etc/apt/source.list文件中获得地址,然后从这些地址中检索需要更新的包。 最后,需要注意的一点是,每回更新之前,我们需要先运行update,然后才能运行upgrade和dist-upgrade,因为相当于update命令获取了包的一些信息,比如大小和版本号,然后再来运行upgrade去下载包,如果没有获取包的信息,那么upgrade就是无效的啦!
Ubuntu点滴--apt-get update和upgrade的作用的更多相关文章
- ubuntu sudo update与upgrade的作用及区别
ubuntu sudo update与upgrade的作用及区别 入门linux的同志,刚开始最迫切想知道的,大概一个是中文输入法,另一个就是怎么安装软件.本文主要讲一下LINUX安装软件方面的特点. ...
- ubuntu 手动更新源 以及使用sudo update与upgrade的作用及区别
一.今天更新一下我的ubuntu系统,用了几个源发现不怎么好用 上网查了一下发现有说阿里云的源挺好用 然后我试了一下 下载速度还挺快,下面分享一下怎么手动添加源列表 1.最好先做一下备份 sudo c ...
- Linux中的update和upgrade的作用
update 是同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包.update是下载源里面的metad ...
- Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.
报错命令 root@ubuntu:/etc/apt# apt-get update Err: http://mirrors.aliyun.com/ubuntu trusty InRelease Cou ...
- Ubuntu用sudo apt-get update出错:E: Problem executing scripts APT::Update::Post-Invoke-Success
Ubuntu用sudo apt-get update出错: E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /u ...
- 关于Ubuntu下apt的一些用法及和yum的比较
Fedora和Red Hat有yum安装软件,Ubuntu有apt工具. apt简单的来说,就是给Ubuntu安装软件的一种命令方式. 一.apt的相关文件 /etc/apt/sources.list ...
- 在Ubuntu下运行 apt-get update命令后出现错误:
在Ubuntu下运行 apt-get update命令后出现错误: The package lists or status file could not be parsed or opened sud ...
- Fully Update And Upgrade Offline Debian-based Systems
Let us say, you have a system (Windows or Linux) with high-speed Internet connection at work and a D ...
- 修改Ubuntu默认apt下载源
修改Ubuntu默认apt下载源 默认下载源很慢,改成阿里的下载速度超快 sudo vim /etc/apt/sources.list 将文件内容替换成 deb http://mirrors.aliy ...
随机推荐
- 修改VNC访问的密码
:vncserver :iptables -I INPUT -p tcp --dport -j ACCEPT 客户端方式 :iptables -I INPUT -p tcp --dport -j AC ...
- SqlCommand.ExecuteNonQuery()执行查询返回值的问题
SqlCommand.ExecuteNonQuery 方法对连接执行 Transact-SQL 语句并返回受影响的行数.但是有个前提:必须是 UPDATE.INSERT 和 DELETE 语句.而对于 ...
- 配置HylaFAX传真服务器
配置HylaFAX传真服务器转自 http://blog.chinaunix.net/uid-8551991-id-248081.html参考:http://www.hylafax.org/howto ...
- C++学习17派生类的构造函数
基类的构造函数不能被继承,在声明派生类时,对继承过来的成员变量的初始化工作也要由派生类的构造函数来完成.所以在设计派生类的构造函数时,不仅要考虑派生类新增的成员变量,还要考虑基类的成员变量,要让它们都 ...
- Java中的匿名类
我们知道接口一般用于定义一种规范或操作协议,然后子类实现接口的所有功能.如下面的简单代码: 定义IMessage接口 package org.lyk.entities; public interfac ...
- PS 的参考线
新建参考线 菜单:"视图-新建参考线", 直接输入想要位置的参考线. 参考线对齐 按住Shift键拉辅助线,辅助线会自动对齐到当前标尺的刻度上. 按住Alt ...
- 查看sql server数据库文件信息
--drop table #dbfiles --deallocate cursor1 ------ declare cursor1 cursor for SELECT name from sys.da ...
- 【转】SQL Server 查询表的记录数(3种方法,推荐第一种)
--SQL Server 查询表的记录数 --one: 使用系统表. SELECT object_name (i.id) TableName, rows as RowCnt FROM sysindex ...
- Map集合的遍历方式:
迭代器来遍历 : entrySet() ; keySet(); values(); eg.HashMap<String,String> map = new HashMap<Strin ...
- win8 C 盘 突然少了 十几G 空间 原因,解决方法
原因: win8 默认最大虚拟内存为 16G多,但现在电脑本身内存就大,所以应该不用了.我现在电脑本身内存是16G. 如果C盘空间大,这个无所谓了,如果C盘空间小可以按以下操作,拿回16G空间: 解决 ...