A Junos software upgrade may fail during the package cleanup phase when the package database contains a corrupted junos-install entry. The upgrade process is unable to remove the existing package metadata and aborts before installing the new software image.
During software installation, the following error is observed:
Removing package 'junos-install'...pkg_delete: the package info for package 'junos-install' is corrupt(use -f to force removal)
Additionally, the shell may report:
pkg_info: the package info for package 'junos-install' is corrupt
While the currently installed Junos release is displayed correctly.
Login to shell with root user creedentials.
1. Verify the corrupted package entry:
pkg_info | grep junosls -ld /var/db/pkg/junos-install*
2. Attempt to remove the corrupted package metadata:
pkg_delete -f junos-install
3. If the force removal fails, manually move the corrupted package directory:
mv /var/db/pkg/junos-install* /var/tmp/
4. Confirm the corruption message is no longer present:
pkg_info | grep junos
5. Retry the Junos software installation:
request system software add <image-file> no-copy
.