Acontece que há um programa chamado autotrash que funciona no Ubuntu 16.04 LTS.
Aqui está um artigo que descreve como funciona:
Esvazie a lixeira automaticamente no Ubuntu
- > Este artigo é informativo, mas é mais antigo, portanto, não siga as instruções de instalação.
Em vez disso, basta fazer isso:
sudo apt-get update
sudo apt-get install autotrash
Em seguida, o programa é executado inserindo o comando autotrash com argumentos.
Isso pode ser executado periodicamente pelo cron e com base em parâmetros específicos:
Esses argumentos são descritos em detalhes no
página man do autotrash para Ubuntu 16.04 LTS
EXCERTO:
% bl0ck_qu0te% autotrash [--delete number_of_megabytes_to_purge]
autotrash [--keep-free number_of_megabytes_to_free]
% bl0ck_qu0te%
The most common option is -d, which will purge files that have been in
the trash for more then a given number of days.
The option --delete will remove at least the given number of megabytes
from the trash, removing the oldest trash first.
Using --keep-free will make sure at least the given number of megabytes
of free space is available, by automatically setting --delete to the
right value. For example, to keep at least a 1GB of free space,
removing files from the trash if needed, use autotrash --keep-free 1024
A página man continua descrevendo muitas outras opções.