I install wifi dkms module, remove the package, then install it back again since I can't modprobe -r it, and after reinstalling it, I still can't, all the while wifi works. To be clear, I've uninstalled wifi driver, and yet wifi still works.

Running lspci -k | grep Adapter shows nothing, nor Wireless instead of adapter.

  • Welcome to U&L! You question is not clear. Please, perform question format with corresponding to style (distinguish commands with code block). Provide steps that you do to understand what you want to do also. May 5, 2019 at 22:14
  • Sometimes grep with -i option help. Particularly in cases where you don't sure if the search key in lower or upper case. May 5, 2019 at 22:17
  • it is upper case
    – janat08
    May 6, 2019 at 23:16

1 Answer 1


This is actually related to different file deletion semantics.

On e.g. a Windows system, you cannot normally delete a file that is being used. But on Unix-like systems, filesystems usually follow the POSIX standard filesystem semantics. That means when you delete a file that is being used:

  • the delete command must return successfully
  • the name of the file will immediately be removed from the directory and can be replaced with a new file with the same name immediately afterwards if necessary
  • the actual contents of the file will stay on disk until whatever is using the file actually stops using it; at that point, the filesystem will automatically complete the delete operation.
  • EXCEPTION: if there are multiple hard links to the file (= the same file actually has more than one filename), then only the single hard link (= that particular filename) for the file will be deleted. The actual file will only be deleted after all the hard links are deleted and nothing is using the file any more.

This can be mind-blowing to someone used to Windows-like file deletion semantics. It actually makes things like updating software that may or may not be in use at the time much easier, but it can also cause some surprises if you're not aware of it.

For example, if you are running out of disk space because some program is writing more and more data into a huge file, deleting that file will not give you any disk space back until that program actually closes the file (or is stopped). Instead, the proper way to get disk space freed again ASAP in that situation without killing the program is to truncate the file to zero length without deleting it.

Background: on POSIX-style filesystems, the primary, guaranteed-unique identifier for a particular file is not the filename, but the inode number of the file. You can think of it as a sort of Social Security ID number for the file. A directory can be thought of as a special type of a file, that associates filenames with inode numbers, for the convenience of humans that cannot deal with numbers like a computer can.

From the computer viewpoint, any hard link is just a plain old directory entry: each file will normally have at least one hard link.

From the human viewpoint:

  • A file with two (or more) hard links has two (or more) names at the same time. Those names can be in different directories, but must be within the same filesystem, as the uniqueness of the inode number is only guaranteed within a single filesystem.
  • A file with just one hard link is a regular file, and is the normal case.
  • A file with zero hard links is only accessible by those programs that already have it opened, and is about to have its data deleted by the filesystem driver as soon as nobody is holding the file open any more.

The loading and unloading of Linux kernel modules, on the other hand, follows more familiar semantics of "you cannot unload a module that is currently being used."

Together with the POSIX standard filesystem semantics, it means you cannot unload the current version of the module without first shutting down the WiFi adapter. But you could replace the module file on disk with a new version just fine, and at the next reboot, the new version would automatically be used. (Making sure your initramfs is regenerated before the reboot would ensure that the old version of the module isn't kept within the initramfs file.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .