For the desktop and PowerPC versions, the aforementioned commands installs all available updates for that version:
sudo apt-get update && sudo apt-get dist-upgrade
Equivalent to using the Software Updater to install updates graphically.
For upgrading across versions (ie. 15.04 → 15.10), you would use:
sudo do-release-upgrade
Also, the graphical alternate than receiving the notification in the Software Updater.
But... the kernel used in the Raspberry Pi is different, @Wimpy warns to not attempt upgrades across 15.04 to 15.10. Regular updates can be applied as normal.
There are ways to "save" which packages you have installed to a file using synaptic to then re-install after setting up the OS again.