I ran different commands. Maybe I have also corrupted many things. But I do not see any sort of error or crashes so far. So my main question is how do I know that my pc is healthy and there is nothing wrong in it?! I want to try all "Safe" commands that you guys probably know and see if something is wrong or not. Kind of like "Debugging my PC" as smooth as possible. Especially focusing on dpkg case. And other cases if you know.
1 Answers
I solved this problem in this way. The answer is a bit different in this case. Since update and upgrade didn't show any error, you need.
First install a random program u want, for ur easiness u can try a small program named "hello" using "sudo apt install hello", and paste below command.
for package in $(apt remove --purge hello -y 2>&1 | grep "warning: files list file for package '" | grep -Po "[^'\n ]+'" | grep -Po "[^']+"); do apt-get install --reinstall "$package" -y; done
Incase if u don't know how to paste this command. For a demo, create a file named ls.sh and edit and paste above command. Go to its properties allow the file for executing. And go to terminal and reach to that folder where your script is, using "cd" and type "./ls.sh" to execute.
Now this will take huge amount time depending your internet speed and whether its a SSD or HDD. Fast internet + SDD = Less time. So, if its not in ur case than u can simple press Ctrl + C to stop the program. The number of "installing packages" decrease time by time. Stop at your will, run at your will.
To clean your memory, run:
sudo apt autoclean
sudo apt autoremove
every-time if possible when you stop the script from running.
dpkg -l | egrep -v '^ii|rc
Any chance you have a SSD? – nobody Jul 24 '19 at 08:57dpkg -l | egrep -v '^ii|rc'
the letter are to tiny for me. Big sorry. – nobody Jul 24 '19 at 09:55