当前位置:网站首页>Apt update and apt upgrade commands - what is the difference?
Apt update and apt upgrade commands - what is the difference?
2022-07-03 05:43:00 【TAOXC( ̿ ▀ ̿ ̿Ĺ̯̿̿ ▀ ̿ ̿】
In the previous post , We checked APT Commands and various methods that you can use the package manager to manage packages . This is a general overview , But in this guide , We pause and focus on 2 Command usage . These are apt update and apt upgrade command .
apt update and apt upgrade It's a lot of Linux Two commands most commonly used by users but misunderstood . For some people , They play the same role , But that's not the case . In this guide , We try to distinguish between the two and how to use them .
1)apt update command
This is a command that is mainly called after the installation of a new system or before the installation of a new software package .apt update The command to update Linux Package index or package list of the system . It will not upgrade any packages , Just like some Linux Users are misled .
/etc/apt/sources.list A package index file is a file or database , It contains a list of packages defined in the repository located in the file . The list of other packages is located at /etc/apt/sources.list.d Directory .
Running this command is very safe . If the power supply is suspended or unplugged for some reason , You can recover from where you stopped .
samsung Galaxy S22 Ultra vs iPhone 13 Pro Max vs Pixel 6 Pro
Use... On the terminal cat Command to view the source list file .
$ cat /etc/apt/sources.list
/etc/apt/sources.list file
To update the package list , Please call the following command :
about Ubuntu 18.04 And higher
$ sudo apt update
about Ubuntu 16.04 And earlier
$ sudo apt-get update
2)apt upgrade command
You need to upgrade your software package to the latest version ? then apt upgrade It's an order to execute .apt upgrade The command takes no parameters , Upgrade all outdated software packages on the system to the latest version .
If you need any dependencies , This command will also trigger the installation of new software packages . besides ,apt upgrade It will also install all the security updates required for your system , This strengthens the security of your system .
List the packages that need to be upgraded , Please run apt list --upgradable command . in fact , This is apt update The last displayed prompt of the output .
therefore , To view the packages ready for upgrade , Please run :
$ sudo apt list --upgradable
Upgrade all outdated software packages and apply security patches , Please run the following command :
$ sudo apt upgrade
Do not interrupt or conduct during operation apt Upgrading is safer .
A few things to remember :
If it is interrupted for some reason , Do you have a good backup to restore ?
Whether you send the log to another remote system ?
Is there any manually compiled software ?
Generalization
apt update The command is used to synchronize the list of packages on the system . It is for PPA And the repository to get the latest package list , And make sure they are up to date .
apt upgrade Command to upgrade the software package to the latest version , And install new packages when they are needed as dependencies . It will not delete any packages , If you specify to delete any packages , It will skip them .
边栏推荐
- 【无标题】
- 6.23 warehouse operation on Thursday
- Transferring images using flask
- Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
- Qt读写Excel--QXlsx插入图表5
- Why should we rewrite hashcode when we rewrite the equals method?
- 一起上水硕系列】Day 9
- Xaml gradient issue in uwp for some devices
- Latest version of source insight
- [branch and cycle] | | super long detailed explanation + code analysis + a trick game
猜你喜欢
2022.DAY592
Mapbox tasting value cloud animation
【一起上水硕系列】Day 7 内容+Day8
Final review (Day5)
Kubernetes resource object introduction and common commands (V) - (configmap)
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
Ensemble, série shuishu] jour 9
@Autowired 导致空指针报错 解决方式
Analysis of the example of network subnet division in secondary vocational school
PHP notes are super detailed!!!
随机推荐
Together, Shangshui Shuo series] day 9
一起上水碩系列】Day 9
[together Shangshui Shuo series] day 7 content +day8
How do I migrate my altaro VM backup configuration to another machine?
Go practice -- generate and read QR codes in golang (skip2 / go QRcode and boombuilder / barcode)
Qt读写Excel--QXlsx插入图表5
Best practices for setting up altaro VM backups
Azure file synchronization of altaro: the end of traditional file servers?
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
[untitled]
Go practice -- use redis in golang (redis and go redis / redis)
期末复习DAY8
Es 2022 officially released! What are the new features?
kubernetes资源对象介绍及常用命令(五)-(ConfigMap)
配置xml文件的dtd
PHP笔记超详细!!!
Xaml gradient issue in uwp for some devices
[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer
Configure DTD of XML file
DEX net 2.0 for crawl detection