当前位置:网站首页>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 .
边栏推荐
- [branch and cycle] | | super long detailed explanation + code analysis + a trick game
- SimpleITK学习笔记
- 大二困局(复盘)
- Progressive multi grasp detection using grasp path for rgbd images
- Troubleshooting of 32GB Jetson Orin SOM failure to brush
- MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
- @Solutions to null pointer error caused by Autowired
- Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
- Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- Final review Day8
猜你喜欢

Final review (Day5)

Method of finding prime number

Redhat7系统root用户密码破解

About debugging the assignment of pagenum and PageSize of the formal parameter pageweb < T > (i.e. page encapsulation generic) in the controller

Apache+PHP+MySQL环境搭建超详细!!!
![[trivia of two-dimensional array application] | [simple version] [detailed steps + code]](/img/84/98c1220d0f7bc3a948125ead6ff3d9.jpg)
[trivia of two-dimensional array application] | [simple version] [detailed steps + code]
![[function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram](/img/29/1644588927226a49d4b8815d8bc196.jpg)
[function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram

6.23星期四库作业
![[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

Latest version of source insight
随机推荐
NG Textarea-auto-resize
3dslam with 16 line lidar and octomap
聊聊如何利用p6spy进行sql监控
Talk about how to use p6spy for SQL monitoring
一起上水碩系列】Day 9
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
Deploy crawl detection network using tensorrt (I)
Why should we rewrite hashcode when we rewrite the equals method?
PHP笔记超详细!!!
配置xml文件的dtd
[function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram
redis 遇到 NOAUTH Authentication required
Source insight operation manual installation trial
Learn libcef together -- set cookies for your browser
How do I migrate my altaro VM backup configuration to another machine?
Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
[together Shangshui Shuo series] day 7 content +day8
Webrtc M96 release notes (SDP abolishes Plan B and supports opus red redundant coding)
求质数的方法
Win10 install pytullet and test