sudo apt-get remove python command and accidently removed a bunch of packages that were required. I logged in via command line and installed ubuntu-desktop again but there are other packages that are missing, and I'm looking for a way to easily reinstall those removed packages. Since there's the log at software-center I wanted to ask what the easiest way might be to roll back changes or extract the removed packages list from the software center…
note: I typed
sudo apt-get install .... .... ... ... for about two dozen of those removed programs in that list, but when I pressed enter it didn't install any of them because some package names couldn't be found.
The programs were removed at the same date.
First of all, let me say that removing
pythoncan lead to many fundamental commands not work anymore. So I don't known if what follow will work.
Secondly, I assume that the
package names couldn't be founderror you have, derives from a mispelled name on the command line, or from a package installed locally and not available in repositories.
Then, to obtain a log of removed packages, relatively to the last
dpkglog available (I don't think you need to take into account older logs):
Then edit the
listfile created in the current directory, and only leave lines relative to packages you want to reinstall, based on timestamp of the line. Say you save the modified file to
To reinstall that packages, use the following command:
I inserted the
--simulateoption to see what the command would do. If it is all ok, do the command again with that option removed.
If the command say some packages cannot be found, simply remove them from
list-modand try again.