Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

unable to empty trash TunnelBlick in use

Hi there.. first time mac user here... installed an app "TunnelBlick" which is a vpn client then deleted it ( moved to trash). but now it is stuck over there. whenver i try to empty the trash, it says- The operation can’t be completed because the item “Tunnelblick” is in use. In addittion to these, there is a folder which is the package content of TunnelBlick.app from the previous installation it is also not getting deleted .


i tried appdelete, trash it and force empty from terminal but nothing worked..

MacBook Air, OS X Mountain Lion (10.8.4)

Posted on Sep 3, 2013 1:10 AM

Reply
32 replies

Sep 3, 2013 2:33 AM in response to yrgt

OK, if it is a leftover, then it probably didn't originally come from the top level of the Applications folder, right? IOW, before you started removing TunnelBlick, there was no 85 byte file loose in that folder, correct?


If this is true, the uninstaller is probably failing because it expects this file to be in whatever folder it originally was in & when it doesn't see that folder, it assumes both it & its contents are already deleted.

Sep 8, 2013 11:09 AM in response to yrgt

Hi yrgt


How is that suppose to help us? Still dosent remove the the file from the trash. Btw i have the same problem, and i used the Tunnelblick uninstaller with a properly intalled tunnelblick installation. The uninstaller ran and exited noting the the unistallation was successful, but noticed that it left 'Tunnelblick.app' in the Trash. On emptying dialog flashed up stating... 'The operation can’t be completed because the item “Tunnelblick.app” is in use.'. used the lsof command to find out its being used by finder. Im up for more options from the community. Thanks in adv.

Dec 13, 2013 3:21 AM in response to yrgt

yrgt, you are correct that because you have an "incomplete" installation, the uninstaller isn't detecting anything to uninstall.


The instructions for uninstalling Tunnelblick have been updated to clarify that if you have already partially uninstalled Tunnelblick, you should install it again before uninstalling.


That will create an installation that can be uninstalled successfully, and the uninstall should also release anything left over from the earlier installation so you can empty the Trash.


(Note: It is often better to ask questions about Tunnelblick on the Tunnelblick Discussion Group at https://groups.google.com/forum/#!forum/tunnelblick-discuss.)

Apr 26, 2015 4:20 PM in response to leorussi

leorussi's post helped me get started, but a specific file deeply buried in the Tunnelblick Content folder resisted. Hopefully, this will help others with the same issue.


Here's a short version of what (finally!) worked for me.


1. launch the terminal

2. cd ~/.Trash

3. tried sudo rm -rf Tunnelblick.app but got a long list of errors

4. troubleshooting


I noticed that the first error was different than all the rest:

Error 1: "rm: Tunnelblick.app/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/fr_CA.lproj: No such file or directory"

Error 2 and all subsequent errors looked like this: "rm: Tunnelblick.app/Contents/Frameworks/Sparkle.framework/Versions/A/Resources: Directory not empty"


Basically, there's a problem with the fr_CA.lproj file. Obviously, the file exists, but it thinks that "No such file or directory". It turns out it's symlink to a file that doesn't (and never did) exist on my system. So the following steps get rid of that file/symlink. The subsequent errors are failed attempts to remove the folder tree that contains fr_CA.lproj and go away once that symlink is removed.


5. cd Tunnelblick.app/Contents/Frameworks/Sparkle.framework/Versions/A/Resources

6. tried ls to see if the file is present, which it is, so not helpful

7. ls -leO (note: that's "little L, little E, big O")


(This step largely thanks to https://sites.google.com/site/drazeidler/%22rm%22command-%22operationnotpermitte d%22.)


Shows much more detail, including permissions and symlink info.

These are the results:


total 8

lrwxrwxrwx@ 1 root wheel uappnd 84 Mar 15 03:44 fr_CA.lproj -> /Users/andym/Development/Build Products/Release/Sparkle.framework/Resources/fr.lproj


I'm not "andym", which I think kind of explains why I can't get rid of the file, so we have to delete the link explicitly.


8. sudo find . -type l -delete


(This step thanks to http://www.commandlinefu.com/commands/view/2369/find-broken-symlinks-and-delete- them.)


9. ls produces no results (which is good!)

10. cd ~/.Trash

11. sudo rm -rf Tunnelblick.app


SUCCESS! And the trash is empty.

Apr 26, 2015 5:24 PM in response to noamkfir

Thanks, noamkfir, for the great writeup of how you solved the problem.


The symlink target of "/Users/andym/Development/Build Products/Release/Sparkle.framework/Resources/fr.lproj" is very interesting. Such a link target could not appear in been an official build of Tunnelblick because our build process uses a different directory structure that could not have created such a link. It must have been built by someone else ("andym", presumably). Not only that, but the build was created from a very old version of the source code. There was a bug that created the symlink using an absolute path (which is what you saw) instead of a relative path but the bug was fixed in revision r1994 of the Tunnelblick source code on 2012-04-13 – more than three years ago!


Because of this, you might want to examine your system for any evidence that this unofficial version of Tunnelblick did anything harmful to your system.


I always recommend that people using free software should download it from an official build if possible, to avoid malware posing as, or inserted into, a program. Tunnelblick's official website is https://tunnelblick.net. That will redirect you to the Tunnelblick Project hosted by Google Code. (The redirection will change to SourceForge or GitHub later this year because Google Code is being discontinued.)

unable to empty trash TunnelBlick in use

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.