Tablespaces do not give space back to the OS. Deleted rows simply leave free space in the tablespace.
If the tables were generated while innodb_file_per_table was ON, then do SHOW TABLE STATUS to see which ones have more than a few MB of “Data_free”. For those, do OPTIMIZE TABLE. (Start with the smallest).
If all the tables were built with OFF, you are in a bad situation. The standard fix is to take a full dump, clear the disk (consider upgrading mysql at the same time), and reload everything. This time have innodb_file_per_table=ON before starting.
I ran into an issue where the Zabbix DB was expanding by around 10gb a month, which ate up my space over time. After digging into the /var/lib/mysql and found an excessive amount of binlog (binary log) files. Checking the usage with “sudo du -h”, I was able to see that the binlogs were taking 200gb. We set up log rotate to resolve and deleted the old files.
You can setup the variable in mysql “expire_logs_days” instead of rotating logs.
For further discussion, you can create a new thread, as this thread was for separate topic.