To fix this error,
run-parts: failed to exec /etc/update-motd.d/99-livepatch-kernel-upgrade-required: No such file or directory
run-parts: /etc/update-motd.d/99-livepatch-kernel-upgrade-required exited with return code 1
execute the following command.
sudo cp /snap/canonical-livepatch/current/resources/99-livepatch-kernel-upgrade-required /etc/update-motd.d/99-livepatch-kernel-upgrade-required