Why is Wpa_Supplicant Using So Much Disk Space?
In Ubuntu, wpa_supplicant is the background service responsible for managing your Wi-Fi connections, negotiating security keys, and keeping you connected to your router.
Under normal circumstances, it runs quietly in the background. However, if your router has a weak signal, or if there is a subtle incompatibility between your Wi-Fi card driver and the access point, wpa_supplicant can enter a panic loop. It will continuously attempt to reconnect, failing hundreds of times per second, and writing every single failure to the system log (/var/log/syslog). Over a few days, this can generate massive log files (sometimes gigabytes in size), completely filling up your hard drive and crashing the system.
How to Stop Wpa_Supplicant from Flooding the Logs
You can stop this behavior by reducing the verbosity (logging level) of the wpa_supplicant daemon.
- Open your Ubuntu Terminal (shortcut:
Ctrl + Alt + T). - You need to edit the service file. Type the following command and press Enter:
sudo nano /lib/systemd/system/wpa_supplicant.service
- Look for the line that starts with
ExecStart=. It usually looks like this:
ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
- You need to add the
-q(quiet) flag, or multiple-qflags to suppress all non-critical errors. Modify the line to look like this:
ExecStart=/sbin/wpa_supplicant -u -s -qq -O /run/wpa_supplicant
- Save the file in Nano by pressing
Ctrl + O, thenEnter, then exit withCtrl + X. - Reload the systemd daemon so it recognises the change:
sudo systemctl daemon-reload
- Restart the Wi-Fi service:
sudo systemctl restart wpa_supplicant
The -qq flag forces the service to only log absolute critical fatal errors, preventing the endless spam of minor connection warnings from eating your disk space.