Reading my daily Ubuntu 10.10 Maverick Meerkat development emails, I noticed a new package in the repositories: it's called Autotrash and it can delete files in your trash when they become older than a given number of days, purge older files to ensure a specific amount of disk space is free and some other options.
To get the "rm" command to move the file(s) to trash instead of removing them completely, you must install the trash-cli utility and set an alias for "rm" to use trash-cli.
Every now and again, I’ll find myself with some files sitting around in my trash that I can’t delete. This can be particularily problematic when I’ve got several gigs worth of stale ISOs sitting there giving me an error like: 'Error removing file: Permission denied'
The trash project allows you to interact with your desktop trashcan from the command line. It lets users "undo" deletions made with the trash command in a similar manner to restoring files from the trashcan in a desktop environment. For experienced Linux users, the trash command comes in handy when you want to put a file into the trashcan from the command line.
By default, Ubuntu does not show Computer,home,network and Trash icon on the desktop in Ubuntu. Instead Ubuntu shows the Trash icon on the extreme right of the bottom panel. Also having the Trash icon on the desktop in Ubuntu is a good option, because it becomes easier to drag - drop files onto the Trash icon.