Reinstall Ubuntu automatically

There is a very simple command that reinstalls all the distribution packages and reconfigures them automatically. This is particularly helpful when you have done a partial upgrade and eventually have broken the system dependencies tree.

sudo dpkg-reconfigure -phigh -a

since this command would take a lot of time to process (~1 hour) depending on your hardware in case you have a minor dependency problem you can fix it via

sudo apt-get install -f
Code:
sudo dpkg-reconfigure -phigh -a

As I watched, every single package was stopped, reconfigured, and restarted. This process took the better part of an hour and a half, since it was effectively the same as re-installing but using packages that already existed. It finally completed and dumped my back to a command line. I rebooted into recovery mode, selected “try to fix X”, rebooted, and, to my untter amazement, Ubuntu had repaired itself! I was restored to a completely functioning desktop with the upgrade installed!

My point, is, if something gets broken during an upgrade, it looks like there is not too much that this command cannot fix. So, before you give up and reinstall (like I was about to do), give it a shot! It might work for you, too.

Related posts:

  1. Monitoring Real-time user logins in ubuntu
  2. Recover wasted disk space in Ubuntu
  3. Gnome network manager automatically connects to wrong networks!
  4. change keyboard layout in shell
  5. Speed up Ubuntu Linux!
  6. Parcellite crash on icon click, Zim does not load
  7. hide user list in Ubuntu Lucid 10.04 login
| Print This Post Print This Post | Email This Post Email This Post
RSS 2.0 | Trackback | Comment

10 Responses to “Reinstall Ubuntu automatically”

  1. [...] missglückten Upgrade entmutigt aufgebt und euch mit einer Neuinstallation abfindet.Quelle: aldeby.org Weitersagen:Ähnliche Artikel (sortiert nach Relevanz):Video Podcasts und Ubuntu So, nun wieder [...]

  2. [...] Nobody was born with Linux knowledge [vía Ubuntu [...]

  3. [...] [Nobody was Born with Linux Knowledge] Also Read Thunderbird 3 Release Candidate 1 now Available for DownloadInstall Firefox 3 Beta 3 [...]

  4. [...] Mas info en Nobody was born with Linux knowledge [...]

  5. [...] There is a very simple command that reinstalls all the distribution packages and reconfigures them automatically. This is particularly helpful when you have done a partial upgrade and eventually have broken the system dependencies tree. Read it here [...]

  6. Brie says:

    Depending on what you are looking to accomplish, it might just be better to reinstall. (It takes a lot less than an hour, these days.)


    Brie

Leave a Reply

XHTML: You can use these tags: b, cite, code, em, i, q cite="", strike, strong.