Gulliver

Q: Cannot delete app/directory/file in Finder

I tried to update WhatRoute but something went wrong. I reloaded the Update and that worked fine, app does work.

 

However, since that time I have a file in my trash called "WhatRoute.app" that cannot be deleted. The Finder says "cannot be deleted because it is in use". Activity monitor shows nothing. Restarted several times, also tried secure mode but nothing helped.

 

Tried to use Terminal using "sudo rm .../WhatRoute.app" but get an error message stating this was a directory that cannot be deleted.

 

So what is it now? directory or app in use? And how can I get rid of it?

 

Please help!

iMac with Retina 5K display, OS X El Capitan (10.11.6)

Posted on Sep 27, 2016 4:08 AM

Close

Q: Cannot delete app/directory/file in Finder

  • All replies
  • Helpful answers

  • by Lexiepex,

    Lexiepex Lexiepex Sep 27, 2016 5:05 AM in response to Gulliver
    Level 6 (10,497 points)
    Mac OS X
    Sep 27, 2016 5:05 AM in response to Gulliver

    Make sure Whatroute is not in the login items, then restart the mac and try emptying the Trash again.

  • by Gulliver,

    Gulliver Gulliver Sep 27, 2016 10:12 AM in response to Gulliver
    Level 7 (25,643 points)
    Desktops
    Sep 27, 2016 10:12 AM in response to Gulliver

    Some more information gained: The path is /.Trashes/501/WhatRoute

     

    Cannot delete either Trashes nor 501 (after making them visible ofcourse), both give an error -50, and therefore also not WhatRoute.

     

    Any ideas?

  • by Lexiepex,

    Lexiepex Lexiepex Sep 27, 2016 11:21 AM in response to Gulliver
    Level 6 (10,497 points)
    Mac OS X
    Sep 27, 2016 11:21 AM in response to Gulliver

    Try this: Start in the Safe Mode (holding the shift key). Login. Empty Trash.

  • by Old Toad,

    Old Toad Old Toad Sep 27, 2016 12:07 PM in response to Gulliver
    Level 10 (141,336 points)
    Mac OS X
    Sep 27, 2016 12:07 PM in response to Gulliver

    If the Safe Mode method doesn't work for you try the following;

     

    1 - open the Trash bin and select the file

    2 - use the key combination Option+Command+Delete which should give you this option:

    Finder001.jpg

    3 - click on the Delete key and you should be able to remove the file.

    OTsig.png

  • by Gulliver,

    Gulliver Gulliver Sep 28, 2016 1:48 PM in response to Old Toad
    Level 7 (25,643 points)
    Desktops
    Sep 28, 2016 1:48 PM in response to Old Toad

    Hello again, Old Toad :-)

    Does not work, system says file is being used.

  • by Old Toad,

    Old Toad Old Toad Sep 28, 2016 1:50 PM in response to Gulliver
    Level 10 (141,336 points)
    Mac OS X
    Sep 28, 2016 1:50 PM in response to Gulliver

    Launch Activity Monitor and find the app in the CPU pane.  Use the Quit/Force quit button at the top to quit that app.  Then try emptying the Trash bin.

  • by Gulliver,

    Gulliver Gulliver Sep 28, 2016 2:33 PM in response to Old Toad
    Level 7 (25,643 points)
    Desktops
    Sep 28, 2016 2:33 PM in response to Old Toad

    C'mon, that was one of the first things I did. Does not show. I wouldn't post here if I had not tried everything I found in the discussions - including Dr. Smoke's advice for "Problems emptying the trash".

  • by Eric Root,

    Eric Root Eric Root Sep 28, 2016 2:38 PM in response to Gulliver
    Level 9 (72,629 points)
    iTunes
    Sep 28, 2016 2:38 PM in response to Gulliver

    Trash – Empty When File is Locked or in Use

     

    Try holding down the option/alt key while trying to delete the Trash. If that doesn’t work, here is some more information.

     

    Trash FAQ    

     

    Trash won’t empty     

  • by Gulliver,

    Gulliver Gulliver Sep 28, 2016 2:46 PM in response to Eric Root
    Level 7 (25,643 points)
    Desktops
    Sep 28, 2016 2:46 PM in response to Eric Root

    Tried these as well. No success. The problem is tjat the file seems to be in use but I cannot find out by what application. All tricks like activity monitor or Terminal commands either do not show it at all or declare it a directory (Terminal).

  • by Lexiepex,

    Lexiepex Lexiepex Sep 29, 2016 12:35 AM in response to Gulliver
    Level 6 (10,497 points)
    Mac OS X
    Sep 29, 2016 12:35 AM in response to Gulliver

    In your administrator account  open Terminal

    copy paste this command:

    sudo chflags nouchg ˜/.Trash/501/WhatRoute

    then

    sudo rm -Rf ˜/.Trash

    or

    sudo rm ˜/.Trash/501/*

     

    alternative:

    Download  FindAnyFile  from  http://apps.tempel.org/FindAnyFile/

    Install, run,

    type in the name  WhatRoute, you may find more, use your brain and delete.

    then hold the Alt/Option key while clicking the "Find" button, type your admin password:

    it will find all file(s) named Whatroute, even in the Trash.

    Then you select that file and CTL+click on it: you get two possibilities: "move to the Trash"  and  "Delete immediately",

    sometimes Delete immediately does not work, then choose move to Trash (even when in the Trash).

    After that close FAF and try to empty the Trash in one of the ways mentioned above.

  • by Gulliver,

    Gulliver Gulliver Sep 30, 2016 8:11 AM in response to Lexiepex
    Level 7 (25,643 points)
    Desktops
    Sep 30, 2016 8:11 AM in response to Lexiepex

    Thanks Lexiepex,

     

    the output after the second command is:

    "rm: /Volumes/Updates und Installer/.Trashes//501/WhatRoute.app: Directory not empty

    rm: /Volumes/Updates und Installer/.Trashes//501: Directory not empty

    rm: /Volumes/Updates und Installer/.Trashes/: Directory not empty"

     

    Does not seems to work either :-(

  • by Lexiepex,

    Lexiepex Lexiepex Sep 30, 2016 9:48 AM in response to Gulliver
    Level 6 (10,497 points)
    Mac OS X
    Sep 30, 2016 9:48 AM in response to Gulliver

    incredible. I think I know what is causing this.

    Now think hard: was there a disk connected when you got rid of Whatroute?

    If yes: connect that same disk ! then do everything again.

  • by Gulliver,

    Gulliver Gulliver Sep 30, 2016 9:55 AM in response to Lexiepex
    Level 7 (25,643 points)
    Desktops
    Sep 30, 2016 9:55 AM in response to Lexiepex

    Good point, and yes, there are several externsl disks attached. However, they are always attached...

  • by Lexiepex,

    Lexiepex Lexiepex Sep 30, 2016 11:21 AM in response to Gulliver
    Level 6 (10,497 points)
    Mac OS X
    Sep 30, 2016 11:21 AM in response to Gulliver

    The point is that when you delete something that is on an external disk (also), for whatever reason, it has to be deleted when that disk is connected, otherwise it does not go. Perhaps disconnect and connect again. It may be that Whatroute also made "deposits" on an external (or even more). Try it again.