Ubuntu: How can I reinstall packages accidentally removed when trying to remove another package?



Question:

I accidently executed sudo apt-get remove --purge gstreamer0.10, and the packages such as gimp, gnome-, Rhythmbox and etc are removed, so I forced to stop the processing, but I don't remember what packages were deleted. How can I reinstall the packages?


Solution:1

I forced to stop the processing

If you mean that you halted the package manager during its work, this is a bad idea. Much better to just let it do what it's doing, then reverse it later.

If apt-get now refuses to work because a previous operation was interrupted, you can try dpkg --configure -a and apt-get install -f to try and fix the problem. But it's not guaranteed to work.

I don't remember what packages were deleted

You can have a look at the DPKG log as described in this question. It points out that the DPKG log is at: /var/log/dpkg.log and it should show the packages that were installed or removed.

In general however, I believe that installing the metapackage ubuntu-desktop should restore any missing packages that normally come with an Ubuntu desktop install.

sudo apt-get install ubuntu-desktop  

If you need to individually install all the separate packages, it may mark some dependencies as "manually installed" which can leave around extra cruft during future upgrades.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »