While I was upgrading from 18.04 to 20.04, dpkg
was interrupted, I fixed dependency problems, but a problem left unsolved. Today, while I was upgrading my system with Synaptic package manager, it crashed, then I again fixed dependency issues. But when tried to run pip3
, it says:
Command 'pip3' not found, but can be installed with:
sudo apt install python3-pip
I was sure that python3-pip
is installed, but I followed the instruction which gave this output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (20.0.2-5ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
So, I reinstalled python3-pip
and pip3
started working. But I suspect that this has occurred with many packages, so I want to reinstall all installed package with the following command:
sudo apt list --installed | sed 's/\// /' | awk '/\[installed\]/{print $1}' | sudo xargs apt install --reinstall -y
Should I do this? Is it good idea?
Edit: My question is similar to Upgrade manager wants me to do a partial upgrade, but I have already done those things but resulted in nothing.
Edit: I want to do this because @heynnema suggested me to reinstall Ubuntu after knowing the whole history of the previous problem, all in comments and chat.
Edit: Thanks to @bac0n, now I can understand which packages are affected after seeing the output. Packages that are affected are mostly python2.7
modules.