0

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.

Akib Azmain Turja
  • 1,022
  • 1
  • 12
  • 28
  • What is your '/etc/apt/sources.list' output? Does it say 'fossa' in place of 'bionic'? – Arijit Chatterjee Aug 16 '20 at 12:39
  • 1
    Your previous problem was faulty hardware, not Ubuntu, so I don't see how this tedious (and disk-intensive) process accomplishes anything useful. – user535733 Aug 16 '20 at 12:44
  • @user535733 But this time it is software related. – Akib Azmain Turja Aug 16 '20 at 12:49
  • You are proposing a rather severe solution without explaining what problem it's intended to fix. So far, you have showed us a single package that needed to be reinstalled...and was. Are you encountering similar behavior from other packages? – user535733 Aug 16 '20 at 12:53
  • @user535733 None till now, but I suspect there are many as dpkg was interupped at middle stage. Also after knowing the whole history of previous problem through comments and chat, [heynnema](https://askubuntu.com/users/4272/heynnema) suggested to reinstall Ubuntu. It will reinstall whole system and data won't be lost. – Akib Azmain Turja Aug 16 '20 at 13:04
  • One or two problems might be worth fixing. Heynnema seems to know more than I do, so would suggest using his fix. Your upgrade did not go well and had a crash when updating, so a reinstall would be faster than trying to fix problems as they show up. – crip659 Aug 16 '20 at 13:28
  • 1
    before reinstalling you should take a look at debsums. –  Aug 16 '20 at 19:56

0 Answers0