# Recover packages from update-alternatives

Source: [https://docs.qualcomm.com/doc/80-88500-2/topic/54_Recovery_packages_from_update_alternatives.html](https://docs.qualcomm.com/doc/80-88500-2/topic/54_Recovery_packages_from_update_alternatives.html)

Check and generate update-alternatives configuration files for all OpenEmbedded packages in Rootfs:
      
1. Sync code and build.
2. Copy tools to build the folder and run the following code:

        cd pokyCopy to clipboard

        MACHINE=qrb5165-rb5 DISTRO=qti-distro-Ubuntu-fullstack-debug source qti-conf/set_bb_env.shCopy to clipboard

        bitbake qti-Ubuntu-robotics-imageCopy to clipboard
3. After this script finishes running, check if your packages have conflict with Ubuntu OSS packages. For more information on how to check and generate update-alternatives configuration files, see [Check and generate update-alternatives configuration files for your packages](https://docs.qualcomm.com/doc/80-88500-2/topic/53_Check_and_generate_update_alternatives_configuration_files_for_your_packages.html).

If some of the Qualcomm packages are broken, restart the system by using the following command to recover the packages during runtime:

    adb shell systemctl restart update-alternatives-recovery.serviceCopy to clipboard

**Parent Topic:** [Update-alternatives](https://docs.qualcomm.com/doc/80-88500-2/topic/50_Update_alternatives.html)

Last Published: Aug 18, 2023

[Previous Topic
Check and generate update-alternatives configuration files for the packages](https://docs.qualcomm.com/bundle/publicresource/80-88500-2/topics/53_Check_and_generate_update_alternatives_configuration_files_for_your_packages.md) [Next Topic
FAQ for update-alternatives – useradd issue](https://docs.qualcomm.com/bundle/publicresource/80-88500-2/topics/55_FAQ_for_update_alternatives___useradd_issue.md)