Categories: Blog

Mac OSX Enable Delete to Trash Fix

I’ve been in a situation recently where I’ve had to wipe my HDD clean and restore my user account back to my iMac via my most recent Time Machine backup.

After 5 hours of transferring data off the external HDD to the iMac, the behaviour of deleting files to the trash wasn’t behaving as expected. When I moved files to the trash icon on the right hand corner or used SHIFT+delete, a prompt would ask whether I wanted to delete the file permanently instead of placing it in the trash. This was not exactly what I wanted. It appears that the move to trash option was affected.

After some investigating, it appears that my home folder was owned by another user of the iMac. Moreso, the .Trash folder in my home folder was missing. Therefore to fix the issue, I performed the following steps:

  1. Open Terminal by press CTRL+Space, then type in ‘terminal’
  2. Type cd /Users
  3. Type ‘ls -la’. If your home folder is owned by a different user, change the ownership to your account.
  4. Type in ‘sudo chown userName:staff ./folderName‘, where userName equates to your account name, and folderName equates to your home folder. (e.g. sudo chown johnsmith:staff ./johnsmith)

Now let’s double check to see if the Trash folder in your account exists:

  1. Go to your home directory by typing ‘cd ~’
  2. Type ‘ls -la’
  3. If the folder exists, and is assigned to a different user, you will be able to change the ownership of that folder by typing in: ‘sudo chown userName:staff ./Trash’ where userName is your account name (e.g. sudo chown johnsmith:staff ./Trash)
  4. If the ‘.Trash’ folder is missing, you will need to re-create it. Do this by typing ‘mkdir ./Trash’

Attempt to move files to your trash by transferring a file you wish to delete to the Trash icon. If all is successful, you will no longer see the prompt to permanently delete the selected file, but rather the icon on the trash appear to be filled with paper.

Let me know if you are experiencing issues or have another method to fix your ‘move-to-trash’ issue.

Peter Tran

View Comments

Share
Published by
Peter Tran

Recent Posts

Kubernetes Resources to Learn From

I have been fortunate in working a lot more with Kubernetes lately over the last few months so I've been…

1 year ago

WordPress Development using Docker

Building my portfolio site, I thought I'd show you how I set up my Wordpress development using Docker. Given the…

1 year ago

Blank images in Puppeteer screenshots solved!

Frustrated with getting blank images in Puppeteer Chrome screenshots, recently I was in a situation where I needed to migrate…

1 year ago

Plans Moving Forward – The Revamped Web and I

It has been six year since my last major revamp/redesign of my current petertran.com.au portfolio site. So what are my…

1 year ago

Bad owner or permissions on .ssh/config

This article helps to solve a Bad owner or permissions on .ssh/config issue occurring on a Windows 10 machine when…

1 year ago

Accept payments easily and effortlessly with Pin Payments integration

Only a few lines of code required is to implement a payment system, thanks to inline Pin Payments integration. Accepting…

6 years ago