If i run systemctl restart nginx i am getting following error, how to solve this?

Error: No space left on device Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

  • 1
    The error is explicit: check your filesystems (df). One of them is full. Commented Feb 22, 2020 at 6:58

1 Answer 1


The error tells you that you need to free up space in your system. To do this, you may want to look run all the commands. Primarily, you can trim excessive log files. They are typical disk space offenders on a misconfigured system, thus:

find /var -name "*.log" \( \( -size +50M -mtime +7 \) -o -mtime +30 \) -exec truncate {} --size 0 \;

This will truncate any *.log files on the volume /var that are either older than 7 days and greater than 50M or older than 30 days.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .