@luceos I run lowest tier of Digital Ocean which is like 512MB.
And it was working before just fine - I was able to update my packages.
SOLUTION
If you are running out of memory, this is what helped me:
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
If this helped you, please do like this thread!