My Ubuntu based distro came with some VirtualBox stuff preinstalled, so I uninstalled it and it autoremoved DKMS package.

From what I saw, it looks like useful package, but do I need it? Stuff like VirtualBox and CDemu installs it on its own, and Ubuntu doesn't ship with it installed by default, so I guess It's "needed" only by some programs which installs modules or something.

I am not a long GNU/Linux user, so I have no experience much, I don't even have an experience with compiling.

Now I have a Linux kernel update pending, but I don't know if I should update it without DKMS installed.

  • are you using any proprietary drivers, such as but no limited to, nvidia graphics or anything special like that installed after installing ubuntu? – mchid Jul 28 '15 at 9:07
  • No, just the free drivers. – Justauser Jul 28 '15 at 11:46
  • 1
    As an additional note: There is no need on a modern computer to uninstall default applications (like DKMS). Unlike (say) Windows, unused applications don't slow down your computer, and on a modern system, the space that they take is insignificant. – Paddy Landau Aug 4 '15 at 10:51

If you do not have dkms modules installed, you do not need the dkms package. It is not installed by default in Ubuntu.

When you install some proprietary drivers, like Nvidia, AMD or Broadcom, dkms package is automatically installed too.

To check if you have any dkms modules you can run

dkms status

If the dkms is not installed, this command will not work, but you can look into /var/lib/dkms/ directory.

Sources of dkms packages are stored in /usr/src/

  • 2
    How to check if I have some modules? You are right, I tried to install proprietary NVIDIA driver, and it wanted to install DMKS, so I guess if I really needed it, package manager will install it for me. – Justauser Jul 28 '15 at 11:47
  • @Justauser Added to the answer – Pilot6 Jul 28 '15 at 11:51
  • I tried to install DKMS just to try the command, it came with nothing. And there wasn't dkms folder in /var/lib/ In /usr/src/, there are 2 folders related to linux-headers – Justauser Jul 28 '15 at 11:58
  • So you do not have dkms modules. – Pilot6 Jul 28 '15 at 12:02

I guess you've looked into DKMS a little already, it's used for updating kernel modules which are outside of the normal kernel source. Often it's drivers and packages like VirtualBox that need DKMS. You may not necessarily 'need' DKMS, but it's handy to have installed, especially if you have installed extra packages, although not having it installed won't ruin your kernel upgrade.

There's more info about DKMS here, and a useful answer on ask ubuntu here.

  • I've already seen that answer, bu it is too techy. What do you mean by "extra packages"? You mean manually installed? And what does it mean "kernel modules which are outside of the normal kernel source"? – Justauser Jul 28 '15 at 11:53
  • 2
    Extra packages mean other software which you've installed. Some packages, like VirtualBox, need to interact with the kernel, and so install modules into the kernel to enable them to run. When the kernel is updated, the packages module may not work anymore, or may be overwritten. DKMS ensures that if there are any modules loaded into the kernel by supplementary packages, they are dealt with appropriately when the kernel updates, and the software continues to function. – Arronical Jul 28 '15 at 13:12

Short answer: If you want to use Vitualbox also after kernel update, you will need DKMS as well as kernel headers fitting your kernel.

Long answer: This system helps you to compile drivers (aka kernel modules) so they can run with your current kernel. If you don't recompile a modul, it will happen that the modul canot be loaded and therefor the function provided by it will not be avaialble anymore. In your case: If you don't recompile virtual box modules, Virtualbox willnot be available after update. It will start, but cannot start any VM.


Ubuntu will boot fine without DKMS.

If anything you use depended on DKMS but didn't have it as a Depends: in its packaging, you'll notice and you can reinstall DKMS and file a bug.

DKMS is for packages that provide a kernel module in source form (or binary with a source wrapper), so they don't have to update the module for every kernel rebuild. The standard kernel itself always works, regardless of DKMS or not.

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.