Debian Codegraph @

upstream/mageia-cauldron/man8/dnf5-history.8

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