I have seen a lot of questions about similar situations, but no solution suggested have worked for me. I have broken my packages in 18.04 and now I can't uninstall anything to try and start over. I'll walk you though my process.
When running
sudo apt-get remove --purge gazebo9
I get the outputYou might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gazebo9-plugin-base : Depends: gazebo9 (= 9.9.0-1~bionic) ib-sim-plugins : Depends: gazebo9 ignition-acropolis : Depends: ignition-gazebo E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I do what it suggests and run
sudo apt --fix-broken install
and attempt to install theignition-gazebo
package. Here is the result:(Reading database ... 324542 files and directories currently installed.) Preparing to unpack .../ignition-gazebo_1.1.0-1~bionic_amd64.deb ... Unpacking ignition-gazebo (1.1.0-1~bionic) ... dpkg: error processing archive /var/cache/apt/archives/ignition-gazebo_1.1.0-1~bionic_amd64.deb (--unpack): trying to overwrite '/usr/bin/ign-gazebo', which is also in package ignition-gazebo2 2.0.0-2~bionic Errors were encountered while processing: /var/cache/apt/archives/ignition-gazebo_1.1.0-1~bionic_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
Now I try deleting the
/var/cache/apt/archives/ignition-gazebo_1.1.0-1~bionic_amd64.deb
file. When I try purging gazebo after this I get the same result as before.Next I try to
sudo apt remove --purge ignition-gazebo
(which isnt installed so this step was never going to work). This results is the same message as step 1.
I am now left with the puzzle of wanting to remove gazebo
(and then all ros-melodic
packages which just lead to the same issue) but not being able to because ignition-gazebo
is broken and/or missing. Been trying to resolve this absolute mess for 3 days now, does anyone know how to resolve this.
ADDITIONAL: I tried to install the synaptic package so I would have a GUI to do this in, but I can't install it and it gives me the same message as before.