You have mixed software sources from Ubuntu 22.04 (jammy) and Ubuntu 24.04 (noble) in your /etc/apt/sources.list file. Mixing software sources from different releases can cause package management problems. Please edit your /etc/apt/sources.list file to be fully compatible with Ubuntu 24.04 by following the instructions in What is the correct output of cat /etc/apt/sources.list?.
It is not recommended to upgrade packages held back by phased updates!!! Phased updates are designed to protect users from potential issues by ensuring a controlled and tested rollout process. Manually upgrading packages held back by phased updates bypasses these safeguards and can expose your system to risks that phased updates are meant to mitigate. In addition prematurely upgrading packages held back by phased updates can break your package management so badly that there is no alternative to completely reinstalling Ubuntu!
To upgrade the packages listed in the results of apt list --upgradable run the following commands.
for pkg in $(apt list --upgradable 2>/dev/null | awk -F/ 'NR>1 {print $1}'); do
sudo apt upgrade "$pkg"
done
apt list --upgradable 2>/dev/null: Lists the upgradable packages, suppressing error messages.
awk -F/ 'NR>1 {print $1}': Uses awk to split each line by the / character and print the package name ($1). The NR>1 condition ensures that the header line is skipped.
sudo apt upgrade "$pkg": Upgrade each package found by the for pkg in $(apt list --upgradable 2>/dev/null | awk -F/ 'NR>1 {print $1}'); command. The do .... done loop ensures that each package is upgraded.
If you don't want to risk breaking your system by running the above commands try these ones instead.
for pkg in $(apt list --upgradable 2>/dev/null | awk -F/ 'NR>1 {print $1}'); do
apt --simulate upgrade "$pkg"
done