You can see should restart the server when you see *** System restart required ***
when you start ssh
You can restart with sudo shutdown -r now
You can see your current kernel version with uname -r
You can see all kernel versions in /lib/modules/
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove