Clean up Ubuntu boot partition

If you find that /boot in your Ubuntu is full of you can clean up all old versions with following command:

 

sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')

 

Another command may work for others:

 

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge

Hope this helps someone out there 🙂

Print Friendly, PDF & Email

Amazon AWS Email limitis

I had an issue recently raised that when we tried to send a bulk email report to over 1000 users there was a significant delay in their delivery between first and last email. Upon investigation at first the issue looked like the connectivity from the recipient’s end to be the culprit. However on more detailed look we realised that the issue was that our server was being blocked elsewhere. A little search on the net yielded something, that is not to me at least, easily corrected and done “to protect” clients of AWS. Amazon throttles the number of emails you cans end out from your VPCs per hour. Limit is not important really the fact that they do it is, as is the fact that they have a form to submit to allow reverse DNS records in the same breath. The form can be found here.

Of course you still need to have a valid set of DNS records before AWS will setup the reverse DNS and remove the limitation of email throttling from the provided IP addresses (limit of 2 according to the form but I guess this should be enough for most).

Hope this helps out someone else out there!

Cheers!

Print Friendly, PDF & Email