当前位置:网站首页>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 .
边栏推荐
- ES 2022 正式发布!有哪些新特性?
- Strategy pattern: encapsulate changes and respond flexibly to changes in requirements
- 2022.7.2 simulation match
- 期末复习(DAY6)
- [set theory] relational closure (reflexive closure | symmetric closure | transitive closure)
- [minesweeping of two-dimensional array application] | [simple version] [detailed steps + code]
- Redis使用Lua脚本简介
- Installing altaro VM backup
- Configure DTD of XML file
- Export the altaro event log to a text file
猜你喜欢

Gan network thought

今天很多 CTO 都是被干掉的,因为他没有成就业务

Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN

redis 无法远程连接问题。

How to install and configure altaro VM backup for VMware vSphere
![[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer](/img/9e/a4558e8e53c9655cbc1a38e8c0536e.jpg)
[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer

Go practice -- design patterns in golang's singleton

Deep embedding and alignment of Google | protein sequences

Qt读写Excel--QXlsx插入图表5

Configure DTD of XML file
随机推荐
College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN
【一起上水硕系列】Day 7 内容+Day8
Disassembly and installation of Lenovo r7000 graphics card
[minesweeping of two-dimensional array application] | [simple version] [detailed steps + code]
Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning
Go practice -- closures in golang (anonymous functions, closures)
Export the altaro event log to a text file
Interview question -- output the same characters in two character arrays
Strategy pattern: encapsulate changes and respond flexibly to changes in requirements
@Solutions to null pointer error caused by Autowired
[escape character] [full of dry goods] super detailed explanation + code illustration!
今天很多 CTO 都是被干掉的,因为他没有成就业务
redis 遇到 NOAUTH Authentication required
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
mysql启动报错:The server quit without updating PID file几种解决办法
Final review Day8
期末复习(day3)
Final review (day3)
期末复习(DAY6)
[Shangshui Shuo series together] day 10