Trash location in macOS vs Linux

Posted: less than 1 minute read

White trash (oh wait!) on macOS

The other day, I explained that there is a way to send files and folders to the trash from the the shell. Now, I just found out that there are differences between where is located the trash (it’s a folder nonetheless) in macOS and Linux.

In macOS, the trash is located in your user’s folder rmtrash on macOS, since it’s a much nicer and neat command. And easily to understand.

On another hand, in Linux, you can only use trash-cli (you can’t get rmtrash AFAIK), and I recommend you to install from source, as explained in it’s GitHub site, because if you install using apt-get you are going to get a some kind of an old version without all the commands (trash-restore was missing).

In Linux, you have two trashes when you are operating with trash-cli on shell. One is your user’s trash and you can access to it on this path /home/$USER/.local/share/Trash . There, you can see two folders files and info. I guest that you already know where are the files and where are the info / metadata of the files. However, if you use the command sudo trash-put you files are going to be moved to /root/.local/share/Trash (obviously, or not that obvious as we’ve seen in macOS).

For the other sudo before the command.

Now, you are ready to trash whatever you want.

Trash-cli on macOS Trash-cli on Linux Trash on Raspbian

Leave a comment