#!/bin/bash

ls -l /proc/*/fd/* 2>/dev/null | grep -i deleted | while read fd; do
	: > $fd
	echo $fd
done | grep -o /proc.*fd/ | tr -d '/a-zA-Z' | sort -u | while read pid; do
	kill -KILL $pid
done