The /var directory on UNIX and Linux is a directory for changing "variable" files, hence the directory name. It is best if the design of the server architecture has already created a sufficiently large and separate partition for / var. Nevertheless, it happens that this directory is full. In most cases, less the log files are the causers than the directories of the respective package manager or, if set up, backup files that are cached there.
The cause can be explored in this way
du -h --max-depth=1 /
du /var/cache/* | sort -n
lsof -Pn +D /var/cache/ | awk '{print $1}' | sort | uniq
After "/var/cache/apt/" emerged as a space junker, this solution is a useful one.
apt-get autoclean
apt-get autoremove
apt-get clean