Blindly upgrading packages (manually or via script) can lead you into all sorts of trouble.
Inform yourself before doing any upgrades, if it is safe to upgrade. Avoid upgrading core packages, build a new image instead.
If you do chose to upgrade packages, especially with a script: You have been warned. Don't complain on the forum and be ready to deal with the consequences yourself, such as manual dependency resolution and additional free space consumption, potentially leading to ABI-conflicts and soft-bricking.
See upgrade_packages for more information.