8181
8282## Package Management
8383
84- ### Packages from Any Repository
84+ ### Installing
85+
86+ #### Packages from Any Repository
8587
8688` ` ` yaml
8789type : dnf
@@ -91,7 +93,7 @@ install:
9193 - package-2
9294` ` `
9395
94- ### Packages from URL or File
96+ #### Packages from URL or File
9597
9698- If the OS version is included in the file name or URL, you can substitute it with the ` %OS_VERSION%` magic string
9799 - The version is gathered from the `VERSION_ID` field of `/usr/lib/os-release`
@@ -104,7 +106,7 @@ install:
104106 - custom-file.rpm # install files/dnf/custom-file.rpm from the image repository
105107` ` `
106108
107- # ## Install Packages from Specific Repositories
109+ # ### Packages from Specific Repositories
108110
109111- Set `repo` to the name of the RPM repository, not the name or URL of the repo file
110112
@@ -117,17 +119,7 @@ install:
117119 - package-1
118120` ` `
119121
120- # ## Remove Packages
121-
122- ` ` ` yaml
123- type: dnf
124- remove:
125- packages:
126- - package-1
127- - package-2
128- ` ` `
129-
130- # ## Install Package Groups
122+ # ### Package Groups
131123
132124- See list of all package groups by running `dnf5 group list --hidden` on a live system
133125- Set the option `with-optional` to `true` to enable installation of optional packages in package groups
@@ -141,15 +133,7 @@ group-install:
141133 - wm-package-2
142134` ` `
143135
144- # ## Remove Package Groups
145- ` ` ` yaml
146- type: dnf
147- group-remove:
148- packages:
149- - de-package-2
150- ` ` `
151-
152- # ## Replace Packages
136+ # ### Replace Packages
153137- You can specify one or more packages that will be swapped from another repo
154138- This process uses `distro-sync` to perform this operation
155139- All packages not specifying `old:` and `new:` will be swapped in a single transaction
@@ -175,7 +159,7 @@ replace:
175159 new: new-package-2
176160` ` `
177161
178- # ## Installation options
162+ # ### Options
179163
180164The following options can specified in the package installation, group installation, and package replacement sections.
181165
@@ -199,7 +183,7 @@ install:
199183 packages:
200184 ...
201185group-install:
202- skip-unavailable : true
186+ skip-broken : true
203187 packages:
204188 ...
205189replace:
@@ -209,6 +193,29 @@ replace:
209193 ...
210194` ` `
211195
196+ # ## Removing
197+
198+ # ### Packages
199+
200+ - You can set the `auto-remove` option to `false` to only remove the specific package and leave unused dependencies
201+
202+ ` ` ` yaml
203+ type: dnf
204+ remove:
205+ auto-remove: false
206+ packages:
207+ - package-1
208+ - package-2
209+ ` ` `
210+
211+ # ### Package Groups
212+ ` ` ` yaml
213+ type: dnf
214+ group-remove:
215+ packages:
216+ - de-package-2
217+ ` ` `
218+
212219# # Optfix
213220
214221- Optfix is a script used to work around problems with certain packages that install into `/opt/`
0 commit comments