当前位置:网站首页>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 .
边栏推荐
- Sophomore dilemma (resumption)
- Configure and use Anaconda environment in pycharm
- Why is go language particularly popular in China
- 2022.DAY592
- AtCoder Beginner Contest 258(A-D)
- How to install and configure altaro VM backup for VMware vSphere
- [trivia of two-dimensional array application] | [simple version] [detailed steps + code]
- 一起上水碩系列】Day 9
- Redhat7系统root用户密码破解
- Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
猜你喜欢

SimpleITK学习笔记
![[set theory] relational closure (relational closure related theorem)](/img/6a/b6dca7abf592f8d8ab1d6aecc43381.jpg)
[set theory] relational closure (relational closure related theorem)

Disassembly and installation of Lenovo r7000 graphics card

Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)

2022.DAY592

Notepad++ wrap by specified character

College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN
![[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation](/img/c2/991b8febd262cf9237017adc9d1221.jpg)
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation

一起上水碩系列】Day 9

"C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)
随机推荐
kubernetes资源对象介绍及常用命令(五)-(ConfigMap)
Pessimistic lock and optimistic lock of multithreading
ninja: build stopped: subcommand failed.
Sophomore dilemma (resumption)
中职网络子网划分例题解析
MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
Apache+PHP+MySQL环境搭建超详细!!!
Progressive multi grasp detection using grasp path for rgbd images
32GB Jetson Orin SOM 不能刷机问题排查
Obtenir et surveiller les journaux du serveur distant
Final review Day8
Troubleshooting of 32GB Jetson Orin SOM failure to brush
Webrtc M96 release notes (SDP abolishes Plan B and supports opus red redundant coding)
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
2022.DAY592
QT read write excel -- qxlsx insert chart 5
Training method of grasping angle in grasping detection
6.23 warehouse operation on Thursday
Brief introduction of realsense d435i imaging principle
"C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)