Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Intelligent

macrumors 6502a
Original poster
Aug 7, 2013
922
2
So i wanted to check os x installer to which version it was, so opened it and got through the dialogs, but i choosed to install it on my SD-card, but then later canceled the installation because i found out i couldn't see version that way, basically unfinished files are my SD-card like
.OSInstallSandbox-tmp
.OSInstallMessages

tried rm /path/to/file
Says its not a directory okay lets use -rf

rm -rf /path/to/file
gives me an error, okay lets use sudo

sudo rm -rf
Gives me weird errors like "directory is not empty"
"invalid argument"
"input/output error"

What should i do? Is there anyway to delete them without formatting? :/
 
Are you sure you have the path correct? If this is on an SD card your path will be something like:

Code:
/Volumes/nameofSDcard/path/to/file
 
Hmm... do you get an error message with this?

Code:
sudo rm -rf /Volumes/nameofSDcard/path/to/file

sudo rm -rf /Volumes/Untitled/.Trashes/501/OSInstallSandbox-tmp

This is the exact thing, copied from terminal when i press enter it doesn't give me the usual

~Macbook~Pro~15
Or whatever the name of your computer, nothing happens.
Some minutes later the Macbook-Pro-15.~ popped up but it says rm: fts_read:

So now i tried going inside the folder and deleting stuff and it gives me this
rm: /Volumes/Untitled/.Trashes/501/OSInstallSandbox-tmp/Root/System/Library/Security: Directory not empty
 
sudo rm -rf /Volumes/Untitled/.Trashes/501/OSInstallSandbox-tmp

This is the exact thing, copied from terminal when i press enter it doesn't give me the usual

~Macbook~Pro~15
Or whatever the name of your computer, nothing happens.
Some minutes later the Macbook-Pro-15.~ popped up but it says rm: fts_read:

So now i tried going inside the folder and deleting stuff and it gives me this
rm: /Volumes/Untitled/.Trashes/501/OSInstallSandbox-tmp/Root/System/Library/Security: Directory not empty

It looks like you already deleted everything from the SD card and now the files are just sitting in the hidden .Trashes folder on the SD card. Normally if you still have the card plugged in and just empty trash they will go away. Did that not work?

Try this to force that trash to empty.

Code:
sudo rm -rf /Volumes/Untitled/.Trashes/
 
Just in case : Onyx is very good at forcing the trashes to empty.

("Maintenance" from the same developer does the same job in this case, and is easier and safer to use).
 
It looks like you already deleted everything from the SD card and now the files are just sitting in the hidden .Trashes folder on the SD card. Normally if you still have the card plugged in and just empty trash they will go away. Did that not work?

Try this to force that trash to empty.

Code:
sudo rm -rf /Volumes/Untitled/.Trashes/



I have always had the card plugged in but when i empty it just gives me this error "-50" and your command gave me the "directory is not empty" error

EDIT: i finally got it working by using sudo rm -rf on files inside, which didn't work before, it gave me the directory is empty error but it still worked, and now i have 12k files which i can empty through trash.
 
Last edited:
I have always had the card plugged in but when i empty it just gives me this error "-50" and your command gave me the "directory is not empty" error

Ackk... do you think something in that trash is still running on the system and hence won't delete?

Try Bruno's suggestion. If that won't work try a command-r boot to recovery and run the command I gave you from Terminal there. You can find Terminal in the Utilities menu in recovery.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.