Hong Manh's BlogHong Manh's Blog Sharing Technology Knowledge

How to clear Messages System on DirectAdmin

When you use DirectAdmin, there is an important part, but few people pay attention to it: the Messages System.

Messages System is the place to report all problems related to DirectAdmin and the server. However, because notifications are pushed and recorded continuously, sometimes up to several hundred or tens of thousands of messages can lead to your server’s memory being full or increase the limited number of inodes on the server.

As the picture below, my DirectAdmin server has more than 100 thousand notifications in just one day. Most messages are about backup completion, service down and Brute-Force Attack.

In this article, Hong Manh will guide you to delete it to save server resources.

2021 12 20 21.32.23

To clear Messages System on DirectAdmin, there are 2 methods as follows:

1. Clear Messages directly on the interface

First, log in to DirectAdmin, then go to Messages and select Clear Messages System

CleanShot 2021 12 20 at 21.35.02

Next, tick Anything at Subject Contains. => click Clear to delete.

However, if the number of Messages is large, it will likely be suspended, so please do the second way when Messages are too many.

CleanShot 2021 12 20 at 21.15.24

2. Clear Messages with the command

To delete Messages with the command, we first need to SSH or access your VPS/server with root privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

After SSH into the server, run these commands sequentially: And I will annotate each command for you to better understand these commands.

cd /usr/local/directadmin/data/tickets
rm -rf *
cd /usr/local/directadmin/data/admin/
cat /dev/null > tickets.list

Command annotation:

  1. This command will move into a directory named tickets
  2. This command will delete and without asking, delete everything in the directory tickets
  3. This command will move to the directory /usr/local/directadmin/data/admin
  4. This command will make the tickets.list file empty

Hopefully, this article will help you clear the Messages System on DirectAdmin and not take up a lot of resources.

Wishing you success! See more useful articles about DirectAdmin at the following link:

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments

Press ESC to close

Would love your thoughts, please comment.x