inProgress file stuck in Trash

jgelin

macrumors 6502a
Original poster
Jul 30, 2015
901
1,064
St Petersburg, FL
Hello all
I am having quite some trouble emptying the Trash from my iMac. I deleted an inProgress file from a hungup time machine backup and now it is stuck in the trashcan.
I have followed these steps here: http://pondini.org/TM/E6.html but to no avail, and the file still persists.
When I run the command in the above site, I get some directories listed after it is run saying that each listed directory is not empty?
What should I do?
Would Verifying/Repairing the disk help?
Thank you!
 

richard2

macrumors regular
Oct 21, 2010
236
51
England, United Kingdom
Try the following:

  1. Open Terminal,
  2. Enter the following:

    shopt -s dotglob; sudo chflags -R noschg,nouchg ~/.Trash/* && sudo rm -Rf ~/.Trash/*

The correct way of deleting Time Machine backups is to execute "sudo tmutil delete <Path>".
 
Last edited:
  • Like
Reactions: jgelin

jgelin

macrumors 6502a
Original poster
Jul 30, 2015
901
1,064
St Petersburg, FL
shopt -s dotglob; sudo chflags -R noschg,nouchg ~/.Trash/* && sudo rm -Rf ~/.Trash/*
And using this command will leave my other files intact? just making sure as this contains lots of commands that I am unfamiliar with.
[doublepost=1463539241][/doublepost]
Try the following:

  1. Open Terminal,
  2. Enter the following:

    shopt -s dotglob; sudo chflags -Rh noschg,nouchg ~/.Trash/* && sudo rm -Rf ~/.Trash/*

The correct way of deleting Time Machine backups is to execute "sudo tmutil delete <Path>".
And here is the output when running this command:
 

Attachments

richard2

macrumors regular
Oct 21, 2010
236
51
England, United Kingdom
Code:
shopt -s dotglob;
Make the wildcard character "*" match files with names that begin with a dot. (This probably isn't necessary, but it won't cause any harm.) The semicolon means "then execute the following command".

Code:
sudo chflags -R noschg,nouchg ~/.Trash/* &&
Remove the system immutable and user immutable flags from all of the files in the folder ~/.Trash. The double-ampersand means "if the previous command was executed successfully, then execute the following command".

Code:
sudo rm -Rf ~/.Trash/*
Forcefully and recursively delete all of the files in the folder ~/.Trash.

And here is the output when running this command:
Oops! I've corrected the command in my original post. :)
 
Last edited:
  • Like
Reactions: jgelin

richard2

macrumors regular
Oct 21, 2010
236
51
England, United Kingdom
Er, actually, the following is the correct procedure:

  1. Open Terminal.
  2. Type the following:

    sudo chflags -R noschg,nouchg
  3. Type a space.
  4. Drop the folder you wish to delete onto the Terminal window.
  5. In Terminal, press return.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.