0

I have noticed a folder on / called "Previous System". After checking that it did not have anything I need, I moved it to the trash. However, when emptying the trash, I get a "file in use" error.

When I attempt to use rm in the Terminal to perform the delete, this happens:

# rm -rf .Trash/Previous\ System
rm: .Trash/Previous System/private/tmp/coreutils20150822-26525-1gnqu7f/coreutils-8.24/confdir-14B---/<SNIP>confdir-14B---: No space left on device
<several "no space left on device" errors removed>
rm: .Trash/Previous System/private/tmp/coreutils20150822-26525-1gnqu7f/coreutils-8.24/confdir-14B---<SNIP>/confdir-14B---: Directory not empty
rm: .Trash/Previous System/private/tmp/coreutils20150822-26525-1gnqu7f/coreutils-8.24/confdir-14B---: Directory not empty
rm: .Trash/Previous System: Directory not empty

The unedited output shows an error for each 'confdir-14B---' recursion. They are directories, not symbolic links.

Free space is not an issue, df -h reports I have 56 GiB available.

  • I see that you found an answer that works, but I was going to suggest trying this after rebooting as soon as you can get a terminal window open or trying in Single User Mode as root. – rubynorails Oct 12 '15 at 6:28
  • @rubynorails while I didn't mention it, I did try deleting the directory in Single User Mode, and the same result occurred. – andonuts Oct 13 '15 at 3:26
0

Found the solution here: https://superuser.com/a/981772

Basically, cd to the start of the recursive folders, and repeatedly run

for FILE in $(ls); do mv $FILE a; cd a; done

This will rename the next folder to "a" and cd into it. Eventually, this should reach the end of the recursion and/or allow deletion.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .