To update a system using a locally attached keyboard and screen do:
sudo apt update
sudo apt full-upgrade
sudo apt-get autoremove
sudo apt autoclean
Or all in one the old way:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean
all in one, the modern way:
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean
cat /var/log/apt/history.log shows when last update has been done
sudo shutdown before removing power would be the clean way
sudo df -T to check memory size of the SD card
sudo apt-get clean do remove temporary files from the SD card