Follow

folks who use the beloved - I think there was a way to empty trash in Dired... Is there? Or am I imagining this?

I know to navigate to the trash folder, but deleting files in there directly can lead to errors, I always end up using the GUI "empty trash" and I want to do it from Dired?

Share your tips?

Many thanks :)

· · Web · 2 · 1 · 0

@jtr Is your variable delete-by-moving-to-trash set to nil ?

@obrow no, I changed that because I want emacs to delete to the trash. It's a good safety "gotcha". But I also want to be able to clean the trash when it's time.

@jtr try using trashed.el ... GitHub.com/shingo256/trashed

@acdw I'll take a look, but I thought there's a built-in way I forget about

@jtr I mean that'd be pretty cool! I don't really use the Trash much ... I just throw stuff in there where it languishes forever XD

Of course, now you've written about it I've set up a cron job to delete things older than 60 days periodically, so thanks for that!

@acdw ohhhh... That's not a bad idea..!

Only thing is I guess sometimes I want to check if I *really* want to delete things? Then again, 60 days is safe enough time that you probably don't need it... :thaenkin:

@jtr I feel that. I picked 60 days because I've literally never checked my Trash folder, and because 60 days is enough for me. You could easily change it to 365 days or more as well, of course!

For the service, I use trash-cli (in Debian's repos, probably elsewhere too). It has an easy-to-use trash-empty command that takes a number of days. The trashed.el repo has an example for using it as well.

@acdw so far that sounds like the best solution. Thanks for the tips :)

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!