MacOS – Unable to delete file from Downloads folder

findermacostrash

I have a file (4alJRTP_.gif.part) in my downloads folder that won't seem to delete.

img0

Every time I drag it to the trash, nothing shows up in the trash and the file icon remains in the downloads folder.

I also tried opening the file and a pop-up window shows up saying "'file_name.gif.part' can't be found".

img1

How can I get rid of the file icon in my downloads folder? Any help will be greatly appreciated!

Best Answer

First of all BE INCREDIBLY CAREFUL WHEN USING RECURSIVE DELETE FROM TERMINAL

Next, just make sure that the applications that might have used these are closed.

That warning out of the way, here is how you can do it.

  1. First open Terminal (in /Applications/Utilities).
  2. Type cd ~/Downloads and press Return.
  3. Then type sudo srm -f followed by a Space (don’t leave out the spacel). Try this first if it doesn't work then use sudo srm -Rf which is the recursive form of this command
  4. Don’t press Return yet.
  5. Next, in Finder open a window displaying the contents of the Downloads folder.
  6. Select ONLY the files in that window that you want deleted and drag them into the Terminal window; this adds the paths of all the files to the rm(remove) command.
  7. Now, press Return
  8. Enter your administrator password when prompted

In a moment or two the files should be gone.

The same premise works with the Trash folder as well, with a few modifications and you may want to do this as the file may actually be there but hidden.

  1. First open Terminal (in /Applications/Utilities).
  2. Type cd ~/.Trash and press Return.
  3. Then type sudo srm -Rf followed by a Space (don’t leave out the space). You will need the recursive for to handle subdirectories, etc.
  4. Don’t press Return yet.
  5. Next, click the Trash icon in your Dock to open a window displaying the contents of the Trash.
  6. Select everything in that window and drag it into the Terminal window; this action adds the paths of all those files and folders to the rm(remove) command.
  7. Now, press Return
  8. Enter your administrator password when prompted

In a moment or two (depending on how much was in your Trash), the Trash icon should return to its empty state.

To check to see if there are hidden files you can do this.

defaults write com.apple.finder AppleShowAllFiles true

killall Finder

and then to hide them again you can do:

defaults write com.apple.finder AppleShowAllFiles false

killall Finder

I hope that helps, and I really hope that you don't delete things you don't want to... These are powerful tools, and With Great Power Comes Great Responsibility.

Update

The file that you are looking to delete, the one that says *.part is a file extension indicating that a file was downloaded partially.

This likely occured when Firefox, Skype, or another app able to download from the internet stopped a download mid-download.

Take a look Downloads on your browser, command-J on Firefox, shift-command-J on Chrome, and alt-command-L in Safari, and see if any of the files there has a partial download. You should be able to cancel the download there and then that file should clear up, or stop reappearing after you download it.

-- The answer I provided is based on the technique that I obtained from Joe Kissell's article on MacWorld and have used during the times I have not been able to empty my trash bin.