Check if a restart is needed

needs-restarting -r

will say if the system needs to be restarted.