Ubuntu-desktop is a meta-package in ubuntu that connects all the packages that are installed by default in a fresh ubuntu install. For that reason you can remove it without any damage to other packages or your system. It can be automatically removed if you remove ekiga or gnome-games.
But what if at some point you want to revert all the changes so you have the default packages reinstalled again?
Running :
sudo apt-get install --reinstall ubuntu-desktop
does not reinstall its dependencies. So the solution is :
sudo apt-cache depends ubuntu-desktop | awk -F ":" '{print $2}' | \ sed '/^$/d' | xargs sudo apt-get \ install --reinstall --install-recommends --yes
(yes this is one line :))
Enjoy
Update:
this is the apt-get way to achieve the above easier :)
sudo apt-get install –reinstall ubuntu-desktop sudo apt-get build-dep ubuntu-desktop
Hi there
many thanks for this tip! I really needed this one!
Greetings
Thanks a lot, that saved me a good hour.
Thanks this has worked out for me.
I have 64bit version, and I hit few issues, but manage to resolve them:
– removed i386 references from generated sudo apt-get install
– got lib(something, can’t remember which one) issues, so I did sudo apt-get remove –purge lib(something)
then just run the generated sudo apt-get install again, and it worked – the lib(something) was reinstalled in the process.
yes i know, i had this difficulties too in my upgraded 11.10 installation.
removing i386 packages indeed seems to solve the errors.
Thank you!! I am reinstalling xubuntu-desktop, I let’s keep my fingers crossed.
Thanks! This fixed my “failed to initialize ubuntu” error. I added gtkmm-dev and for some reason it uninstalled a bunch of critical unity stuff, this repaired it :)
Thanks…This saved my butt.
très pratique, une variante :
sudo apt-cache depends ubuntu-desktop | awk -F “:” ‘ ($2) \
{print “sudo apt-get install –reinstall –install-recommends –yes”, $2}’ | sh -x
on peut enlever le “| sh -x ” et le remplacer par “> script.sh” pour rediriger dans un fichier qu’on éditera pour vérifier et corriger (moi j’ai eu des “i386” en trop).
pour executer ensuite “sh -x ./script.sh”
This should do the same (and is a lot simpler to understand / modify)
sudo apt-get install –reinstall ubuntu-desktop
sudo apt-get build-dep ubuntu-desktop
indeed this is the official way to do it
i’ll update the post
thanks !
Thank you. This was my lifesaver. ^_^
hi,
Many thanks….