> ## Content Index
> Fetch the complete content index at: https://scriptcrunch.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How To Rectify Transaction Lock /var/lib/rpm in Linux
- URL: https://scriptcrunch.com/how-to-rectify-transaction-lock-varlibrpm-in-linux/
- Published: 2013-12-18T19:04:00.000Z
- Updated: 2013-12-18T19:04:00.000Z
- Author: Scriptcrunch Editorial
- Tags: Linux, #Migrated-1758801465347, #wp, #wp-post, #Import 2025-09-25 11:57

When you interrupt yum installation and try to reinstall the package again , you are likely to get a transaction lock. You can rectify this issue using the following methods.   
1\. Remove the db files and rebuild those files again using the following commnds.  

Sudo rm -f /var/lib/rpm/__db.00*

Sudo rpm --rebuilddb

Once you executed the above commands all the locks will be freed and you can continue with your instllation.  
  
2\. You can also remove the locks by kill all the existing process which is holding the lock on the resource using the following commands.  

Sudo ps –ef

The above command will show all the existing process.  
  
Find the process id and kill the ,process using the following command  

Kill –9 <process id>

Use the following command to search the yum processes   

Ps aux | grep yum 

The above command will list all the yum process.   
Get the process id and kill all the process using the following command.   

Kill -9 process-id