Not sure if this is an apt issue or not but so far this is only happening for ros packages.
Having not updated my packages for a long time, it seems apt is stuck trying to upgrade a ros package to a (now outdated and hence nonexistent) version.
e.g. when trying to upgrade
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: ros-noetic-tf2-msgs 1 upgraded, 0 newly installed, 0 to remove and 74 not upgraded. Need to get 44.4 kB of archives. After this operation, 0 B of additional disk space will be used. Err:1 http://packages.ros.org/ros/ubuntu focal/main amd64 ros-noetic-tf2-msgs amd64 0.7.6-1focal.20230620.183347 404 Not Found [IP: 126.96.36.199 80] E: Failed to fetch http://packages.ros.org/ros/ubuntu/pool/main/r/ros-noetic-tf2-msgs/ros-noetic-tf2-msgs_0.7.6-1focal.20230620.183347_amd64.deb 404 Not Found [IP: 188.8.131.52 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Understandably, the (now outdated)
0.7.6-1focal.20230620.183347 is no longer found since the current version as per here is
I've tried different combinations of
sudo apt install ros-noetic-tf2-msgs=0.7.7-1focal.20231013.184042 but no luck.
apt update and
apt update --fix-missing shows nothing suspicious. All upgradable packages are ros packages
... Hit:16 http://packages.osrfoundation.org/gazebo/ubuntu-stable focal InRelease Hit:18 http://packages.ros.org/ros/ubuntu focal InRelease Hit:20 http://packages.ros.org/ros2/ubuntu focal InRelease ... Fetched 3,863 kB in 3s (1,163 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 75 packages can be upgraded. Run 'apt list --upgradable' to see them.
I've also made sure that
sources.list and the keys are set up correctly as of the ubuntu install instructions
apt-cache policy ros-noetic-tf2-msgs gives
ros-noetic-tf2-msgs: Installed: 0.7.6-1focal.20221014.220058 Candidate: 0.7.6-1focal.20230620.183347 Version table: 0.7.6-1focal.20230620.183347 500 500 http://packages.ros.org/ros/ubuntu focal/main amd64 Packages *** 0.7.6-1focal.20221014.220058 100 100 /var/lib/dpkg/status
Any help would be greatly appreciated.
I'm leaving a complete ros reinstall as a last resort