While trying to run a yum update I received the below warning message:
Running yum-complete-transaction and answering 'N' to the prompt also no, it just said 'Not removing old transaction files' yum. Improve this question.
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
To resolve this yum-complete-transaction is required to complete the unfinished transactions.
If there are more unfinished transactions, yum-complete-transaction attempts to complete the most recent one first. To clean transaction journal files without attempting to resume the aborted transactions, use the -cleanup-only option. Solution: Install yum-utils, drop down to root environment (su -) and run the cmd yum-complete-transaction, it should run and fix your yum problem This entry was posted in Computer, server, Software and tagged yum-complete-transaction by muthii.
yum-complete-transaction is a program which finds incomplete or aborted yum transactions on a system and attempts to complete them. It looks at the transaction-all* and transaction-done* files which can normally be found in /var/lib/yum if a yum transaction aborted in the middle of execution.
If it finds more than one unfinished transaction it will attempt to complete the most recent one first. You can run it more than once to clean up all unfinished transactions.
Yum Complete Transaction Rhel 7
Run the following to install yum-utils (which provides yum-complete-transaction), cleanup and finish the transactions.
yum install yum-utils
yum clean all
/usr/sbin/yum-complete-transaction --cleanup-only
Now yum commands can be run without the unfinished transactions warning.
yum update
Introduction
The yum package manager maintains a history of all yum based transactions i.e. software installation, update and removal operations. This history is kept in an sqlite database (rpmdb) which is available in the /var/lib/yum/history/ directory. The transaction history in the rpmdb can be queried via the yum history command. We would also like to point out that a log of package installs, updates and removals is maintained in a text file as well located at /var/log/yum.log. The file provides one line descriptions about the yum related actions that were performed. But a very interesting facet of the yum transaction history is that transactions can be repeated and reversed and also incomplete transactions can actually be resumed. In this article we’ll be focusing on how we could resume incomplete yum transactions and complete them to fruition.
Demonstration
With a basic understanding of how yum transactions are maintained, let’s perform a practical demonstration of how we could resume an incomplete yum transaction. Consider the following operation, we are just installing the openssl package on our system. What if during the installation we loose our network connectivity. This is just a single package so repeating the installation isn’t challenging but if it were an entire system update then redoing the entire task from scratch would be tedious. To simulate an interruption I hit the ctrl+c key to stop the yum package installation.
The log containing the progress of the above interrupted transaction has been saved in /tmp in a file named yum_save_tx.2018-03-02.12-34.RZUTa5.yumtx. This file is a simple text file and we can view it’s contents as shown below.
Yum Complete Transaction Rhel 7
To resume the transaction we use the load-transaction sub-command with the yum command followed by the complete path to the .yumtx file.
It might not seem obvious from the above command line output but the openssl package installation actually resumed exactly from where I had left it off. If you wish to check if the system has any incomplete transactions and complete them then use the yum-complete-transaction command.
Yum Complete Transaction Cleanup Only
To only cleanup incomplete transactions without resuming them, use the following command.
Yum-complete-transaction Loop
Conclusion
This concludes our demonstration of how we could use yums’ transaction history feature to resume incomplete transactions. We hope that you’ve found this demonstration to be useful and we look forward towards your feedback.
The following two tabs change content below.Yum-complete-transaction
- Google Cloud basics: Activate Cloud Shell - May 19, 2021
- Create persistent swap partition on Azure Linux VM - May 18, 2021
- DNF, YUM and RPM package manager comparison - May 17, 2021
- Introduction to the aptitude package manager for Ubuntu - March 26, 2021
- zypper package management tool examples for managing packages on SUSE Linux - March 26, 2021