Locate and edit my.cnf files on the system, commonly located at /etc/mysql/my.cnf on Ubuntu.
Comment out (using #) any lines that begin with log-bin and expire_logs_days in the my.cnf file and save to disable the binary logs.
Restart the MySQL/MariaDB or equivelent service. For example:
sudo service mariadb restart
Previously created binary logs will not yet be removed. To remove any previously created binary logs, see here