Ubuntu Tip:How to remove,install and reconfigure xorg without reinstalling ubuntu

The X.Org Server (officially the X.Org Foundation Open Source Public Implementation of X11) is the X server in the official reference implementation of the X Window System.

This tutorial will explain How to remove,install and reconfigure xorg, without reinstalling ubuntu this is very useful if you messup with your xorg file.

Open terminal and run these commands

Remove existing xorg using the following command

sudo apt-get remove --purge xserver-xorg

Install xorg using the following command

sudo apt-get install xserver-xorg

Reconfigure xorg using the following command

sudo dpkg-reconfigure xserver-xorg

I hope this helps some users to fix their xorg problems.

Sponsored Link

Incoming search terms:

Related posts

35 thoughts on “Ubuntu Tip:How to remove,install and reconfigure xorg without reinstalling ubuntu

  1. This tip worked perfectly for me removing the xorg and reinstalling it. After removing it in safe mode and reinstalling it. My system rebooted just fine. Although I crossed my fingers before hand. lol

    [Reply]

  2. Thanks, this worked for me too. Also had to install ubuntu-desktop because that was removed by the above process.

    [Reply]

  3. Thanks a bunch!!! This fixed an update that went very wrong!! Strongly recommend if dealing with proprietary driver updates.

    [Reply]

  4. Tried it, but got a funny result… After boot, I only got som pixels at the top of the screen lightning up. I could jump to different colours with the Ctrl+Alt+F1 through F7, but it’s not giving me the logon screen. Splash is never presented. I figure I have to do a re-install. I’ve tried all sorts of commands and tweaks. Nothing helps. Can get into the safemode menu, and start in failsafeX.

    [Reply]

  5. Those terminal fixes didn’t worky on my netbook ubuntu installation 10.15. for purge i got couldn’t find purge
    for install couldn’t find package xserver-org
    and on reconfigure it couldn’t find xserver-org
    nice try though

    [Reply]

  6. Interesting concept.
    I am having serious issues with xserver-org Version: 1:7.5+5ubuntu1 in lucid 10.04 and the last release of the Matrox Parhelia Series Linux Display Driver v1.4.7 drivers for my Matrox P650 display card.
    They claim they tested with 8.04 and 8.10.
    I was able to use it in 9.04, but with a non-Ubuntu realtime kernel.

    Question:
    Would it be possible to use this method to install the xserver-xorg version that came with, say, 8.10, 9.04 or 9.10 on a lucid base, and pin it so that it doesn’t get upgraded.

    If so how and would it work with the new change to kernel-based mode-setting.

    [Reply]

  7. OMG FML! so sorry, “HelHo”, we share the pain. exact same thing happened to me. HelHo says:
    MAY 13, 2010 AT 8:36 AM
    Tried it, but got a funny result… After boot, I only got som pixels at the top of the screen lightning up. I could jump to different colours with the Ctrl+Alt+F1 through F7, but it’s not giving me the logon screen. Splash is never presented. I figure I have to do a re-install. I’ve tried all sorts of commands and tweaks. Nothing helps. Can get into the safemode menu, and start in failsafeX. (BUT I CANT START IN FAILSAFE)

    [Reply]

  8. Thanks, it worked just fine to get my nvidia card working at 1280 x 1024 resolution after a lot of messing about with other suggestions.

    [Reply]

  9. Tried a dual dvi card to test it out, then when I reverted to on board graphics wouldn’t boot up properly, only login to command line and couldn’t start gdm , panic stations, this sorted it all out
    simple when you know how but finding out how to know how another matter

    [Reply]

  10. This “fix” broke my system. Had to manually reinstall drivers via aptitude. Good that I know a litte *nix cmdline

    [Reply]

  11. not working, I cant get higher than 1024by768 with ati 9600 on a led monitor syncmaster731N

    scott@scott-MS-7104:~$ sudo dpkg-reconfigure xserver-xorg
    [sudo] password for scott:
    scott@scott-MS-7104:~$ sudo dpkg-reconfigure xserver-xorg
    scott@scott-MS-7104:~$

    I had an nvidia card in it then trying the ATI card and all sorts of troubles

    [Reply]

  12. I have made a small script using the above commands to reinstall xorg, as i ahve to do this about every few months… :D

    If anybody wants/needs it it can be found here:
    http://tehcomputerlad.dyndns.org/downloads/fix_xorg.sh

    Hope this can help someone, It helped me after I installed the ATI Radeon Linux drivers, It installed MESA with it and foobared my box

    Also:
    wget http://tehcomputerlad.dyndns.org/downloads/fix_xorg.sh
    chmod 777 fix_xorg.sh
    sh fix_xorg.sh

    [Reply]

  13. WTF!, i should have never done this. I have 3 user accounts in my BT5 r1 >root >1 admin and >1 ordinary user. My admin’s X is the only problem. A black screen prevents me to run BT5 in my admin account for 2 days now. X wont start ive tried the dpkg-regconfigure and other sorts of stuff, and those didnt work. But my root and the 3rd account’s X is in perfect condition. This day i was hoping to fix it! logged in as the admin account again today, but didnt use the startx(coz its “broken”), and started typing “your fix” from my paper. . . . And boom! . . .After the purge, i went to apt installing. And its too late for me to realize that this command is not only for the current user but for the whole BT5. And so guess what! Thanks to my newbie dumb ass brain and your expert smart ass know how brain, i have no more X!!! You should have at least include in your post some warning, something like: “you are about to kill x as a whole and in all users” “x which your os is using shall be sent to hell” “so be warned” “be sure to be in the GUI dont do this at startup” “and for all of you who arent that rich to have an internet connection everyday, suffer, you dumb ass poor wanna bes”. . . .

    [Reply]

  14. Beautiful. I was messing with different graphics cards and installing proprietary drivers when, err, my system would only boot into tty. The x.org was screwed. This saved me. Massive thanks.

    [Reply]

  15. Did not work for me. Keeps booting to terminal. I did startx also, but get this error: Loading extension GLX

    Fatal server error: no screens found (EE)

    xinit: giving up

    [Reply]

Leave a comment

Your email address will not be published. Required fields are marked *