Option -y not working in sudo apt upgrade -y

Ubuntu Linux kernel : 7.0.0-29-generic #29~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Wed Aug 12 17:25:56 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Ubuntu version : 24 . 04 . 4 LTS apt: v. 2 . 8 . 3 Snap: v. 2 . 76 . 2 Flatpak: v. 1 . 14 . 6 I have a cron job that runs at 11 pm every day. Basically it runs the update script for apt, snap and flatpak packages and then cleans and removes old package versions.…