Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between repo_upgrade and package_upgrade and apt_upgrade on cloud-init?

Tags:

cloud-init

In an example from AWS EC2 manual shows that we can perform apt update and upgrade by putting:

repo_update: true
repo_upgrade: true

But I can't find exactly same commands in cloud-init official documentation, so I keep looking for the similiar commands and found this, they give two commands package_upgrade and apt_upgrade but didn't tell the difference.

It makes me curious that what's the difference between repo_upgrade and package_upgrade and apt_upgrade

like image 615
Lisbeth Avatar asked Sep 16 '25 15:09

Lisbeth


2 Answers

Yes this is quite puzzling, until I stumbled upon this, from which it seems that repo_upgrade applies to Amazon Linux only.

Also I found this ancient fan-made example.

It seems that most of the explanations are correct.

like image 142
dz902 Avatar answered Sep 19 '25 08:09

dz902


What I managed to find is

repo_upgrade description

(the source is Security updates section of Package repository topic - the official AWS Documentation)

package_update: (boolean) Set true to update packages. Happens before upgrade or install. Default: false. package_upgrade: (boolean) Set true to upgrade packages. Happens before install. Default: false. apt_update: (boolean) DEPRECATED: Dropped after April 2027. Use package_update. Default: false. apt_upgrade: (boolean) DEPRECATED: Dropped after April 2027. Use package_upgrade. Default: false. (see more details here)

like image 22
Sergey Kolosov Avatar answered Sep 19 '25 08:09

Sergey Kolosov