Debian Codegraph @

upstream/debian-unstable/man8/dnf5-history.8

raw
1 .\" Man page generated from reStructuredText
2 .\" by the Docutils 0.22.4 manpage writer.
3 .
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .TH "DNF5-HISTORY" "8" "May 09, 2026" "" "dnf5"
32 .SH NAME
33 dnf5-history \- History Command
34 .SH SYNOPSIS
35 .sp
36 \fBdnf5 history <subcommand> [options] [<transaction\-spec>]\fP
37 .SH DESCRIPTION
38 .sp
39 The \fBhistory\fP command in \fBDNF5\fP allows the user to view what has happened in past transactions
40 and offers several operations on these transactions, like undoing and redoing them. In order to
41 use the transactions in these commands, it is assumed that they were committed while using the
42 \fBhistory_record\fP configuration option.
43 .sp
44 For more information about \fB<transaction\-spec>\fP see
45 \fBdnf5\-specs(7)\fP, Patterns specification \%<#\:transaction-spec-label>\&.
46 .SH SUBCOMMANDS
47 .INDENT 0.0
48 .TP
49 .B \fBlist\fP
50 .nf
51 List info about recorded transactions in the system.
52 If no \fB<transaction\-spec>\fP is specified it uses all transactions.
53 .fi
54 .sp
55 .TP
56 .B \fBinfo\fP
57 .nf
58 Print details about specific transactions.
59 If no \fB<transaction\-spec>\fP is specified it uses the last transaction.
60 .fi
61 .sp
62 .TP
63 .B \fBundo\fP
64 .nf
65 Revert all actions from the specified transaction.
66 Exactly one transaction must be specified by \fB<transaction\-spec>\fP\&.
67 .fi
68 .sp
69 .TP
70 .B \fBredo\fP
71 .nf
72 Repeat the specified transaction.
73 Automatically uses \fB\-\-ignore\-extras\fP and \fB\-\-ignore\-installed\fP\&.
74 Unlike the rest of history commands it overrides reasons for transaction packages that are already installed.
75 This command is useful to finish interrupted transactons.
76 Exactly one transaction must be specified by \fB<transaction\-spec>\fP\&.
77 .fi
78 .sp
79 .TP
80 .B \fBrollback\fP
81 .nf
82 Undo all transactions performed after the specified transaction.
83 Exactly one transaction must be specified by \fB<transaction\-spec>\fP\&.
84 .fi
85 .sp
86 .TP
87 .B \fBstore\fP
88 .nf
89 Store the transaction into a directory.
90 If no \fB<transaction\-spec>\fP is specified it uses the last transaction.
91 .fi
92 .sp
93 .UNINDENT
94 .SH OPTIONS FOR LIST AND INFO
95 .INDENT 0.0
96 .TP
97 .B \fB\-\-reverse\fP
98 .nf
99 Reverse the order of transactions in the output.
100 .fi
101 .sp
102 .TP
103 .B \fB\-\-contains\-pkgs=PACKAGE_NAME,...\fP
104 .nf
105 Show only transactions containing packages with specified names.
106 This is a list option. Globs are supported.
107 .fi
108 .sp
109 .TP
110 .B \fB\-\-json\fP
111 .nf
112 Request JSON output format for machine\-readable results.
113 Available for \fBlist\fP and \fBinfo\fP subcommands only.
114 .fi
115 .sp
116 .UNINDENT
117 .SH OPTIONS FOR UNDO, ROLLBACK AND REDO
118 .INDENT 0.0
119 .TP
120 .B \fB\-\-skip\-unavailable\fP
121 .nf
122 Allow skipping packages actions that are not possible perform.
123 .fi
124 .sp
125 .UNINDENT
126 .INDENT 0.0
127 .TP
128 .B \fB\-\-offline\fP
129 .nf
130 Store the transaction to be performed offline. See offline command \%<#\:offline-command-ref-label>, \fBdnf5\-offline(8)\fP\&.
131 .fi
132 .sp
133 .TP
134 .B \fB\-\-store=PATH\fP
135 .nf
136 Store the current transaction in a directory at the specified \fBPATH\fP instead of running it.
137 The stored transaction can be performed by the replay command \%<#\:replay-command-ref-label>, \fBdnf5\-replay(8)\fP\&.
138 Note that repository ids in the stored transaction are mangled to \fB@stored_transaction(repo_id)\fP this is required
139 because during replaying the stored repositories are recreated and they might collide with already present repositories
140 (this doesn\(aqt apply to the special @System repository).
141 .fi
142 .sp
143 .UNINDENT
144 .SH OPTIONS FOR UNDO AND ROLLBACK
145 .INDENT 0.0
146 .TP
147 .B \fB\-\-ignore\-extras\fP
148 .nf
149 Don\(aqt consider extra packages pulled into the transaction as errors.
150 They will still be reported as warnings.
151 .fi
152 .sp
153 .TP
154 .B \fB\-\-ignore\-installed\fP
155 .nf
156 Don\(aqt consider mismatches between installed and stored transaction packages as errors.
157 They will still be reported as warnings.
158 Using this option can result in an empty transaction.
159 For install actions skip already installed packages.
160 For upgrade actions skip groups or environments that are not installed.
161 For remove actions skip not installed packages/groups/environments.
162 .fi
163 .sp
164 .UNINDENT
165 .SH EXAMPLES
166 .INDENT 0.0
167 .TP
168 .B \fBdnf5 history list\fP
169 .nf
170 List all transactions, where the most recent transaction is printed first.
171 .fi
172 .sp
173 .TP
174 .B \fBdnf5 history info 4\fP
175 .nf
176 Show detailed info about the fourth transaction.
177 .fi
178 .sp
179 .TP
180 .B \fBdnf5 history info last\fP
181 .nf
182 Show detailed info about the last transaction.
183 .fi
184 .sp
185 .TP
186 .B \fBdnf5 history info last\-1\fP
187 .nf
188 Show detailed info about the second to last transaction.
189 .fi
190 .sp
191 .TP
192 .B \fBdnf5 history list 4..8\fP
193 .nf
194 List transactions with id in 4 to 8 range.
195 .fi
196 .sp
197 .TP
198 .B \fBdnf5 history undo last\fP
199 .nf
200 Undo the last transaction.
201 .fi
202 .sp
203 .TP
204 .B \fBdnf5 history undo 4 \-\-ignore\-extras\fP
205 .nf
206 Undo the fourth transaction ignoring extra packages pulled into the reverting transaction.
207 .fi
208 .sp
209 .TP
210 .B \fBdnf5 history list \-\-json\fP
211 .nf
212 List all transactions in JSON format for programmatic processing.
213 .fi
214 .sp
215 .TP
216 .B \fBdnf5 history info last \-\-json\fP
217 .nf
218 Show detailed info about the last transaction in JSON format with complete package details.
219 .fi
220 .sp
221 .UNINDENT
222 .SH JSON OUTPUT
223 .INDENT 0.0
224 .IP \(bu 2
225 \fBdnf5 history list \-\-json\fP
226 .UNINDENT
227 .sp
228 The command returns a JSON array, each element describing one transaction.
229 Each transaction object contains the following fields:
230 .INDENT 0.0
231 .INDENT 3.5
232 .INDENT 0.0
233 .IP \(bu 2
234 \fBid\fP (integer) \- Transaction ID.
235 .IP \(bu 2
236 \fBcommand_line\fP (string) \- Command line that initiated the transaction.
237 .IP \(bu 2
238 \fBstart_time\fP (integer) \- Transaction start time, UNIX time.
239 .IP \(bu 2
240 \fBend_time\fP (integer) \- Transaction end time, UNIX time.
241 .IP \(bu 2
242 \fBuser_id\fP (integer) \- User ID who initiated the transaction.
243 .IP \(bu 2
244 \fBstatus\fP (string) \- Transaction status, typically \(dqOk\(dq.
245 .IP \(bu 2
246 \fBreleasever\fP (string) \- System release version when transaction occurred.
247 .IP \(bu 2
248 \fBaltered_count\fP (integer) \- Number of packages altered in the transaction.
249 .UNINDENT
250 .UNINDENT
251 .UNINDENT
252 .INDENT 0.0
253 .IP \(bu 2
254 \fBdnf5 history info \-\-json\fP
255 .UNINDENT
256 .sp
257 The command returns a JSON array, each element describing one transaction.
258 Each transaction object contains the following fields:
259 .INDENT 0.0
260 .INDENT 3.5
261 .INDENT 0.0
262 .IP \(bu 2
263 \fBid\fP (integer) \- Transaction ID.
264 .IP \(bu 2
265 \fBstart_time\fP (integer) \- Transaction start time, UNIX time.
266 .IP \(bu 2
267 \fBend_time\fP (integer) \- Transaction end time, UNIX time.
268 .IP \(bu 2
269 \fBrpmdb_version_begin\fP (string) \- RPM database version before the transaction.
270 .IP \(bu 2
271 \fBrpmdb_version_end\fP (string) \- RPM database version after the transaction.
272 .IP \(bu 2
273 \fBuser_id\fP (integer) \- User ID who initiated the transaction.
274 .IP \(bu 2
275 \fBuser_name\fP (string) \- User name and details who initiated the transaction.
276 .IP \(bu 2
277 \fBstatus\fP (string) \- Transaction status, typically \(dqOk\(dq.
278 .IP \(bu 2
279 \fBreleasever\fP (string) \- System release version when transaction occurred.
280 .IP \(bu 2
281 \fBdescription\fP (string) \- Command line that initiated the transaction.
282 .IP \(bu 2
283 \fBcomment\fP (string) \- User comment for the transaction (usually empty).
284 .IP \(bu 2
285 \fBpackages\fP (array) \- List of packages altered in the transaction. Each package object contains:
286 .UNINDENT
287 .INDENT 0.0
288 .INDENT 3.5
289 .INDENT 0.0
290 .IP \(bu 2
291 \fBnevra\fP (string) \- Package name\-epoch:version\-release.architecture.
292 .IP \(bu 2
293 \fBaction\fP (string) \- Action performed (Install, Remove, Upgrade, etc.).
294 .IP \(bu 2
295 \fBreason\fP (string) \- Reason for the action (User, Dependency, etc.).
296 .IP \(bu 2
297 \fBrepository\fP (string) \- Repository from which the package came.
298 .UNINDENT
299 .UNINDENT
300 .UNINDENT
301 .INDENT 0.0
302 .IP \(bu 2
303 \fBgroups\fP (array) \- List of package groups altered (only present if groups were modified).
304 .IP \(bu 2
305 \fBenvironments\fP (array) \- List of package environments altered (only present if environments were modified).
306 .UNINDENT
307 .UNINDENT
308 .UNINDENT
309 .sp
310 For empty results, both commands return \fB[]\fP\&.
311 .SH SEE ALSO
312 .INDENT 0.0
313 .INDENT 3.5
314 .nf
315 \fBdnf5\-specs(7)\fP, Patterns specification \%<#\:specs-misc-ref-label>
316 .fi
317 .sp
318 .UNINDENT
319 .UNINDENT
320 .SH Author
321 See AUTHORS.md in dnf5 source distribution.
322 .SH Copyright
323 Contributors to the dnf5 project.
324 .\" End of generated man page.