While upgrading OS, will remove the license key from the device?
Under normal circumstances, a Junos software upgrade does not result in the loss of the device configuration or installed licenses. As the rescue config, license database and user accounts will get preserved and will not be over-written or replaced. But it is always advisable to take configuration and license key backup before planning OS upgradation.
Configuration backup:
show configuration | display set | no-more
show configuration | no-more
License information:
show system license status
show system license keys