How to Disable the Ubuntu ‘Vnstatd’ Service

The Network Traffic Logger

In the Linux ecosystem, system administrators often need to track bandwidth usage to monitor server health, detect anomalies, or ensure they remain within hosting provider data caps. vnstat is a popular, lightweight command-line utility designed specifically for this purpose. When installed on an Ubuntu system, it typically deploys a background daemon called vnstatd.service. This daemon continuously monitors the network interfaces (like eth0 or wlan0), silently tallying incoming and outgoing byte counts and periodically saving this data to a local database.

While vnstat is incredibly useful for long-term bandwidth auditing on production routers or limited-bandwidth VPS instances, it is largely unnecessary on standard desktop PCs, local development servers, or ephemeral Docker hosts. If you have no need to keep historical records of your network traffic, or if you rely on external network monitoring tools (like Prometheus or your router’s built-in analytics), the vnstatd daemon is simply wasting CPU cycles and generating unnecessary disk writes to update its database. To optimize your server’s resource footprint and reduce SSD wear, you can safely disable this background traffic logger.

How to Disable the Vnstatd Service

You can permanently prevent the vnstat daemon from tracking your network traffic using standard systemctl commands.

  1. Open your Ubuntu Terminal (or SSH into your server).
  2. To disable the service so it does not load during the boot sequence, run:
sudo systemctl disable vnstat.service

(Note: In Ubuntu, the service is usually named vnstat.service rather than vnstatd.service, though the binary is vnstatd.)

  1. To ensure that monitoring scripts or automated package updates cannot accidentally trigger the service to start up in the background, you must mask it:
sudo systemctl mask vnstat.service

The system will now completely ignore the vnstat daemon. Your network interfaces will operate normally, but bandwidth statistics will no longer be logged to the local database.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.