Your question does not specify clearly that whether you want to simply update or patch installed Ubuntu distro packages or update major release of Ubuntu. Anyway let me give you solution with two possible scenarios: