From command mode, type : n1,n2s/^/#/ n1, n2 are the first and last line that need to comment example: comment from line 10-20 use : 10,20s/^/#/ And to uncomment, we use : n1,n2s/#/
Fix error “cannot open Packages database in /var/lib/rpm” when try to update (upgrade) some packages How to fix: Step1: Remove old lock files running #rpm -rf /var/lib/rpm/__db* Step2: Rebuild rpm database #rpm -vv –rebuilddb