I would like to know what ULG files are on Ubuntu. After trying to find what was using the disk space, I found a directory using 25 GB of 28 GB total, and this directory had 785 ULG files.

Note that I'm working on an Intel Aero RTF, using Ubuntu 16.04, and it can store 28 GB.

Output of du command (the essential part):

root@intel-aero:/var/lib/mavlink-router# du -h /var/lib/mavlink-router/
25G /var/lib/mavlink-router/

Number of files:

root@intel-aero:/var/lib/mavlink-router# find /var/lib/mavlink-router/ -type f | wc -l

Partial results of ls:

root@intel-aero:/var/lib/mavlink-router# ls -lh
total 25G
-rw-r--r-- 1 root root   73M May 22 05:45 00000-2018-05-22_05-14-52.ulg
-rw-r--r-- 1 root root   36M May 22 06:00 00001-2018-05-22_05-45-23.ulg
-rw-r--r-- 1 root root  9.0M May 22 05:00 00002-2018-05-22_04-57-05.ulg
-rw-r--r-- 1 root root   11M May 22 05:01 00003-2018-05-22_04-57-05.ulg
-rw-r--r-- 1 root root  117M May 22 05:46 00004-2018-05-22_04-57-05.ulg
-rw-r--r-- 1 root root  220M May 22  2018 00005-2018-05-22_04-57-05.ulg
-rw-r--r-- 1 root root     0 May 22  2018 00006-2018-05-22_06-31-13.ulg
-rw-r--r-- 1 root root     0 May 22  2018 00007-2018-05-22_06-31-14.ulg

df result:

root@intel-aero:/var/lib/mavlink-router# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        28G   28G     0 100% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G   76M  1.8G   4% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G   48K  1.9G   1% /var/volatile
tmpfs           1.9G  4.0K  1.9G   1% /tmp
/dev/mmcblk0p1   28M  7.7M   21M  28% /boot
tmpfs           382M     0  382M   0% /run/user/0

So questions are:

  • What type of file is a ULG file? Is it a save, config, ... ?
  • Can I remove some of them (or all of them) without any issue later?
  • 1
    so can i remove them? I can't even transfer a 400 kB file because of that overused space
    – damadam
    Aug 10, 2018 at 8:21
  • 2
    mavlink-router - Route mavlink packets between endpoints. ULog is the file format used for logging system data. The format is self-describing, i.e. it contains the format and message types that are logged. If the .ulg files are log files maybe you can read part of one of them to check if it is a log file and therefore it can be deleted except for the most recent log files. According to ULog File Format mavlink-router: C++, ULog streaming via MAVLink.
    – karel
    Aug 10, 2018 at 8:41
  • @PerlDuck Please post it as an answer.
    – karel
    Aug 10, 2018 at 8:48
  • I'll let you do it. It's fairer that way because I got the smaller half.
    – karel
    Aug 10, 2018 at 8:50
  • 3
    logrotate is available, it is installed on Ubuntu16.04 by default, see this drone like a computer (it has got an Atom x7, just a little slower than a computer :D)
    – damadam
    Aug 10, 2018 at 9:11

1 Answer 1


According to a similar question in an Intel forum, Disk fills up, large ULG files in /var/lib/mavlink-router, these ULG files are logfiles of the mavlink-router.

There are only two workarounds:

  • Either disable logging:

    Modify /etc/mavlink-router/main.conf and comment out the line below:

  • Or setup a cronjob to delete them regularly once a day:

    0 2 * * * rm /var/lib/mavlink-router/*.ulg && systemctl restart mavlink-router.service

At first, I thought logrotate with the following snippet could be of help:

/var/lib/mavlink-router/*.ulg {
    rotate 2
        systemctl restart mavlink-router.service

But this won't work as intended because the filenames already have a timestamp and number in them, so each file has a different name and logrotate would simply compress them but never delete them. E.g. 00000-2018-05-22_05-14-52.ulg would become 00000-2018-05-22_05-14-52.ulg.1.gz but never get deleted because there won't be another file with that name that claims its place.

See this post for a possible solution with logrotate for files with timestamps in their name.

  • 5
    Instead of just removing all logfiles daily, you could use find to delete files older that some days or weeks, should you ever need to investigate some old incident.
    – Soren A
    Aug 10, 2018 at 9:03

You must log in to answer this question.

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