Do I "need" DKMS?

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.


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/


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.


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.