Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

destroyedreason

macrumors newbie
Original poster
Apr 15, 2020
17
21
I uninstalled BlueStacks and all of the corresponding files but don’t know how to remove this from the library. I posted a screenshot. Hopefully someone out there knows how I can remove the file. You will notice there is a white circle with a line through it.
I even tried reinstalling BlueStacks then uninstalling it again to try to get rid of the residual file.
 

Attachments

  • DEEEBE5F-5980-46F3-AE05-9750864D60DF.jpeg
    DEEEBE5F-5980-46F3-AE05-9750864D60DF.jpeg
    448.7 KB · Views: 618
Since I assume just regularly moving it to trash didn’t work, open Terminal, write
sudo rm
and drag in the file - if it’s a directory package you will need the -r flag. Then hit enter and write your password, and hit enter again; it’s gone.
In future, using homebrew to install your packages you can use brew zap to make Homebrew handle the uninstall. It typically gets most files for you.

Also, full screen screenshot: cmd+shift+3.
Partial screenshot: cmd+shift+4 drag area
Window screenshot: cmd+shift+4 spacebar, click window
Screenshot menu: cmd+shift+5
 
Since I assume just regularly moving it to trash didn’t work, open Terminal, write
sudo rm
and drag in the file - if it’s a directory package you will need the -r flag. Then hit enter and write your password, and hit enter again; it’s gone.
In future, using homebrew to install your packages you can use brew zap to make Homebrew handle the uninstall. It typically gets most files for you.

Also, full screen screenshot: cmd+shift+3.
Partial screenshot: cmd+shift+4 drag area
Window screenshot: cmd+shift+4 spacebar, click window
Screenshot menu: cmd+shift+5

Thank you sooooo much for all this info!!! I’m new to Mac and never knew much about terminal commands even on Windows. Also thanks for the info on screenshots. I guess you picked up on my lousy picture I took with my phone.🤣

I’m going to try this as soon as I get back on my computer tonight.
 
Thank you sooooo much for all this info!!! I’m new to Mac and never knew much about terminal commands even on Windows. Also thanks for the info on screenshots. I guess you picked up on my lousy picture I took with my phone.🤣

I’m going to try this as soon as I get back on my computer tonight.

You’re welcome :). Commands on macOS are usually the same as on Linux, though there are some differences here and there. Now I am probably not representative of a typical user, but the Terminal is my favourite app, hehe.

If you’re interested, I’ll break down things a bit more to help you understand the command - it can be a slightly dangerous one if abused;

sudo = Superuser do. Anything that follows sudo will be run as root, requiring the administrator password. It may not be necessary to delete the file you want, but I added it to make sure it would get rid of it. You can try without sudo as well and see if it says permission denied.

rm = Remove. The Unix command for removing a file. It takes as input whatever you want to remove.
Dragging something from the Finder to the Terminal will write the path to the file or directory to where your cursor is in the Terminal, so it’s just a “shortcut” for writing the path yourself.

-r = The recursive flag for rm. Normally rm will only delete singular inputs. So if you point it to a package or directory that contains sub-elements, it will need the recursive flag to know you want to delete all su elements as well. If the flag is not set and you point it to a package or directory it won’t delete anything, but will just tell you - this is a security mechanism so you don’t accidentally delete more than you want.
Flags like this are set before the input, so it’d be
sudo rm -r <input>

If even this fails, you can also add the
-f flag, which is the “force” flag.

The reason I said this command can be a little dangerous is obviously since it deletes and can delete as root. Running
sudo rm -r -f /
will essentially say “as root, remove everything from the start of my computer and all the way through all subelements forcefully.
macOS has System Integrity Protection that would protect some core files, but it’d still remove a lot of your system.

So yeah, probably don’t run that one, hehe. But rm’ing a specific file or folder is fine and I do it all the time.
Also I wrote out both flags to make it fit with the explanation above, but if you have multiple flags you can combine them to make it a bit shorter like:
rm -rf <input>

And hey, the image was rather good for something taken with an external camera. Very easy to read everything, but just thought it’d be easier to have the screenshot straight on your machine ;)
 
In future, using homebrew to install your packages you can use brew zap to make Homebrew handle the uninstall. It typically gets most files for you.

Another option to get the files which may have been installed in other locations (such as preferences) on your system is to use an app uninstall program, such as Appcleaner. Doesn't get everything, but is pretty close. Don't know how it compares with homebrew.
 
  • Like
Reactions: destroyedreason
Thank you sooooo much for all this info!!! I’m new to Mac and never knew much about terminal commands even on Windows. Also thanks for the info on screenshots. I guess you picked up on my lousy picture I took with my phone.🤣

I’m going to try this as soon as I get back on my computer tonight.

Be careful with rm. If you use rm on a file, it doesn't go to your recycling bin. It is unlinked and is not coming back through normal means. File recovery is not something you want to rely on. rm -r will do this at a directory level, meaning it will trace its through subdirectories and delete them prior to the current directory.

Do not use this stuff lightly. You can't easily revert it.

Another option to get the files which may have been installed in other locations (such as preferences) on your system is to use an app uninstall program, such as Appcleaner. Doesn't get everything, but is pretty close. Don't know how it compares with homebrew.

Homebrew explicitly installs libraries to a specific package directory, so it knows where it puts things. It does not create various .dylib and orphaned symbolic links everywhere, which are the typical complaints.
 
  • Like
Reactions: destroyedreason
So I tried the sudo rm -r command and this is what I get. I'm not sure what I'm doing wrong but I assume I either didn't add appropriate commands or the spacing is wrong?
 

Attachments

  • Screen Shot 2020-05-10 at 8.08.47 PM.png
    Screen Shot 2020-05-10 at 8.08.47 PM.png
    274.5 KB · Views: 397
Another option to get the files which may have been installed in other locations (such as preferences) on your system is to use an app uninstall program, such as Appcleaner. Doesn't get everything, but is pretty close. Don't know how it compares with homebrew.

Homebrew isn’t just a cleanup/uninstaller. It’s a package manager. It’ll handle installation of software, updating of software, dependency management as well as uninstalling. It’s great.

So I tried the sudo rm -r command and this is what I get. I'm not sure what I'm doing wrong but I assume I either didn't add appropriate commands or the spacing is wrong?

Add the -f flag or answer y to the question it’s prompting you and report back if it’s not working :)
 
Homebrew isn’t just a cleanup/uninstaller. It’s a package manager. It’ll handle installation of software, updating of software, dependency management as well as uninstalling. It’s great.



Add the -f flag or answer y to the question it’s prompting you and report back if it’s not working :)

Okay so I pressed y and this is what I get. I only did it once for the screenshot but if I keep pressing it still says operation not permitted for each sequence.
 

Attachments

  • Screen Shot 2020-05-10 at 8.35.46 PM.png
    Screen Shot 2020-05-10 at 8.35.46 PM.png
    109.6 KB · Views: 289
Okay so I pressed y and this is what I get. I only did it once for the screenshot but if I keep pressing it still says operation not permitted for each sequence.

Operation not permitted could mean that it's currently using them. Reboot first. Make sure none of these libraries are loaded by default. I can't remember how to do that on OSX.

The -f flag indicates to force removal. It can still fail, but it indicates that the shell process should assume a 'y' response to each of these queries.
 
Homebrew explicitly installs libraries to a specific package directory,

Not quite sure what "libraries" refers to. An application code library, or anything that is in one of the Library directories? If the latter, does it handled both ~/Library, /Library? If so, how does it handle things like kernel extensions. launchdaemons and launchagents? I wouldn't think that Homebrew would have been launched at that time some of these are loaded.
 
So I Googled how to delete staged extensions and found this discussion. You guys who know a ton more than me may or may not care to look at it, but from what I understand (my code, terminal knowledge is virtually non-existent), is that I simply can't remove what I was trying to remove without turning off the SIP or System Integrity Protection.

It looks like it can be done through recovery but doesn't seem like it's worth the work to remove this tiny residual file. I kinda just wanted to remove it to feel like I completely accomplished deleting everything leftover from Bluestacks because my OCD was kicking in lol, but in reality it's not harming anything or causing any problems.

Here is the link to that discussion if anyone cares to look at it. If you interpret anything differently than I did feel free to let me know. I kind of want to attempt it just to feel like I accomplished removing the file.

Shoutouts to everyone who has commented on here. You guys posted so much useful helpful information and I have learned a lot just from what has been mentioned one here.

Here is the discussion on the topic of deleting staged extensions from a guy trying to do this with a Paralles file.


I'm not running High Sierra, I have the 2020 MacBook Air but this still seems to be an issue albeit maybe not a real important one to most people. Oh well.
Edit: Upon further research I found this:
 
Last edited:
  • Like
Reactions: 997440
Not quite sure what "libraries" refers to. An application code library, or anything that is in one of the Library directories? If the latter, does it handled both ~/Library, /Library? If so, how does it handle things like kernel extensions. launchdaemons and launchagents? I wouldn't think that Homebrew would have been launched at that time some of these are loaded.

I used the term "libraries" to refer to any package managed by Homebrew.

Also it should be fine to clear kext caches, which is what they're discussing in your link. Just reboot afterward. Most applications won't have kexts of any kind. They're only possibly necessary if the application has to do very low level stuff. It forces your OS to do additional stuff when it boots. Apple seems to be moving toward disallowing such extensions entirely, although I haven't checked up on what alternatives they provide. The annoying thing about kexts is that they're sufficiently low level to crash your system.
 
So I Googled how to delete staged extensions and found this discussion. You guys who know a ton more than me may or may not care to look at it, but from what I understand (my code, terminal knowledge is virtually non-existent), is that I simply can't remove what I was trying to remove without turning off the SIP or System Integrity Protection.

It looks like it can be done through recovery but doesn't seem like it's worth the work to remove this tiny residual file. I kinda just wanted to remove it to feel like I completely accomplished deleting everything leftover from Bluestacks because my OCD was kicking in lol, but in reality it's not harming anything or causing any problems.

Here is the link to that discussion if anyone cares to look at it. If you interpret anything differently than I did feel free to let me know. I kind of want to attempt it just to feel like I accomplished removing the file.

Shoutouts to everyone who has commented on here. You guys posted so much useful helpful information and I have learned a lot just from what has been mentioned one here.

Here is the discussion on the topic of deleting staged extensions from a guy trying to do this with a Paralles file.


I'm not running High Sierra, I have the 2020 MacBook Air but this still seems to be an issue albeit maybe not a real important one to most people. Oh well.
Edit: Upon further research I found this:

Did you try the kernel cache cleaning command referenced in the link you provided?
 
Did you try the kernel cache cleaning command referenced in the link you provided?

HAHA, yes I tried the kernel cache cleaning command and it worked! I swear I tried it before posting this thread and it didn't work but there is a very good chance I didn't type the string correctly.

Thanks for the followup caspers and also thank you for the lengthy explanation of the terminal commands you posted earlier in this thread. I need to save that for future reference since I do not use the terminal that often.

I used to use the terminal more when I was into rooting Android phones but that was not based on my knowledge or technical ability, that was based on posting on forums and copying and pasting specific strings/commands that other people posted.😀

In case anyone ever references this thread in the future the command from the link I posted is:

sudo kextcache --clear-staging
 
  • Like
Reactions: circatee
I want to become superuser on ios terminal on iPhone 6, ios 14. I type su or login and these commands not found. How to become superuser?
 
I want to become superuser on ios terminal on iPhone 6, ios 14. I type su or login and these commands not found. How to become superuser?

I don't know what relevance this has to this thread at all, and you should probably have started a new thread rather than posting in a thread about Macs.

Also iPhones and all iOS devices in generals do not come with a Terminal or command line interface. If you're talking about a jailbroken device there's no way of knowing what modifications may have been made, but in general sudo is preferred to using root as a logged in user to limit the scope of rooted access to specific actions rather than everything initiated by that login shell
 
@casperes1996 thanks for taking the time to post the details, about the Terminal application.
I do not own a Mac (anymore), but, still learned a few things.

Very nice of you to share your knowledge and expertise...
 
@casperes1996 thanks for taking the time to post the details, about the Terminal application.
I do not own a Mac (anymore), but, still learned a few things.

Very nice of you to share your knowledge and expertise...

You're very welcome. Should you ever come to own a Unix machine, Mac, Linux, BSD, - any Unix, and need help with the command line interface I'll happily assist
 
  • Like
Reactions: circatee
You're very welcome. Should you ever come to own a Unix machine, Mac, Linux, BSD, - any Unix, and need help with the command line interface I'll happily assist
About to get a Mac (not sure which one, yet), and I will certainly endeavour to make an effort to use and learn Terminals.
 
About to get a Mac (not sure which one, yet), and I will certainly endeavour to make an effort to use and learn Terminals.

If you’ve never really lived in the command line/Terminal, I recommend starting here
Goes through all the most basic things - Knowing that will make the rest of using the Terminal and understanding what’s happening much easier.

It’s made for Linux but it’s pretty much the exact same on a Mac. Their command line interfaces often line up 1:1 or very nearly 1:1
 
  • Like
Reactions: circatee
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.