I'm trying to install xorg-server in debian wheezy.

I tried to execute a simple command

apt-get install xserver-xorg

It attempts to install ton of video drivers and dri-modules: for nvidia, for intel, for amd, for vesa and so on. And I'd like to keep the system image as small as possible.

How to tell debian that I need the only video driver supporting the card that is present now.


By default, xserver-xorg pulls in xserver-xorg-video-all, which pulls in all the video drivers.

If you know which driver is appropriate, you can install it along with xserver-xorg, and it will satisfy the alternative dependency on xorg-driver-video, avoiding the xserver-xorg-video-all dependency altogether; thus for an Intel IGP:

apt-get install xserver-xorg xserver-xorg-video-intel

If you want to make doubly sure that xserver-xorg-video-all isn't installed, you can use something like

apt-get install xserver-xorg xserver-xorg-video-intel xserver-xorg-video-all_

(note the underscore, which instructs apt-get to purge the package).

To avoid installing the libdrm* packages, you need to avoid libgl1-mesa-dri which depends on all of them (with no easy workaround, so if you want DRI support you need all three implementations, unless you use equivs — but they're quite small). xserver-xorg recommends the package, so

apt-get --no-install-recommends install xserver-xorg ...

should do the trick. This is a good idea anyway if you're after a small image.

  • Stephen, +1, what about the _ trick? Is this just to match nothing when doing Regex match? – heemayl Oct 16 '16 at 22:40
  • 2
    @heemayl it tells apt-get to purge the package (+, - and _ suffixes are equivalent to install, remove and purge respectively, regardless of the command given to apt-get). – Stephen Kitt Oct 16 '16 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.