Make sure you sudo apt-get update before you sudo apt-get upgrade. And if you're getting the dpkg error code, I bet you a buck it's choking on hal or dbus, and I've given the hack for hal and you can safely uninstall dbus (apt-get remove dbus).