The purpose of this website is to display latest work information and also keep track and show my personal growth as a programmer.

This website’s articles are structured under three main categories:

  • Projects
    Here is my work – completed sites, open-source contributions etc.;
  • Tutorials
    These are mainly solutions to more complex problems I have encountered and also reflections of my experience so far;
  • Development
    Here are smaller solutions in my every day work. They are also shown in the Development widget;
  • Tools
    This section will show tools that help me in the every day development of web applications and websites.
The latest

Cleaning up an Ubuntu server

Recently I have run into an HDD space problem with one of my Ubuntu server systems. It’s been up for a few years, without special maintenance from this point of view. So, here are the steps I have taken:

Cleanup the system:

  • sudo apt-get clean
  • sudo apt-get autoclean
  • sudo apt-get autoremove


Cleanup the logfiles:

  • shopt -s globstar # if needed
  • truncate -s 0 /var/log/*.log # first-level logs
  • truncate -s 0 /var/log/**/*.log # nested folders, like /var/log/nginx/access.log
  • find /var/log -type f -name ‘*.[0-99].gz’ -exec rm {} +
  • Extra:
    find /var/log -type f -name ‘*.log.[0-99].gz’ -exec rm {} +


Clean the btmp file:

  • cat /dev/null > /var/log/btmp


You can manually delete files that you do not need or which have not been cleaned by the commands above. Anyway, please be carefull and as a recommendation: do not delete folders inside /var/logs.