Failed Vim Upgrade: Reinstall System Runtime vs. Restore Full Backup to Avoid Mixing Plugin Versions
0 reputation · 19 Nov 2023, 23:22 UTC
After a failed Vim upgrade on Vim 8.2 or later, the system runtime directory ($VIMRUNTIME) may contain a mix of old and new files, while the user directory (~/.vim) usually remains untouched. The goal is to return to a consistent state without introducing subtle plugin incompatibilities. One documented approach is to reinstall the Vim package or rebuild from source, which overwrites system files but preserves personal plugins and settings. The alternative is to restore a full backup of the previous runtime, including both $VIMRUNTIME and ~/.vim, returning to a known-good state at the cost of losing any changes made after the backup.
The uncertainty lies in whether preserving ~/.vim is safer than forcing a clean system runtime, especially when plugins depend on new Vim script features or API changes introduced between minor versions. Both paths require verifying the active version and loaded scripts afterward.
Which recovery strategy minimizes version mismatches when the upgrade failure leaves $VIMRUNTIME inconsistent? Does reinstalling the system package while keeping ~/.vim risk enough plugin incompatibility to favor a full runtime restore? How should the choice change if local modifications exist in system runtime files after the backup was taken?