You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Delete .dmg file

Hello,


I have a Mac running MacOs Mojave, and I want to delete an installer for macos high sierra. Well, long story if I told you how I got it, but I created this .dmg via terminal. I can move it to trash, but it will not get emptied. I want to get rid of this nonsense but this is the error I get;



When I attempt to empty it,



Please help because the dmg file is 5.4 Gigs or so. It's eating up my storage!

I surfed the internet for days, but to no avail. Help!!!!!!!!!!!!!!



[Edited by Moderator]

MacBook Pro with Retina display, macOS Mojave (10.14), null

Posted on Oct 3, 2018 11:59 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 8, 2018 8:25 AM

jacksunders wrote:


Well, how exactly can I make a bootable image of MacOS Sierra (Sierra, not High Sierra)? I have a empty 8 gig usb and think I can make a bootable usb. Can someone help with that?


How to create a bootable installer for macOS - Apple Support

12 replies

Oct 3, 2018 12:11 PM in response to jacksunders

Check that the .dmg that you created is neither mounted to the Desktop, or shown mounted in Disk Utility, and then move to the Trash, and attempt to empty the Trash. If this does not work, then you made yourself an unremovable Mojave monument. Others have unfortunately encountered this problem too.


What you might try instead, is to boot from an external drive containing an older version of macOS that remains compatible with your Mac. Then manually mount the Mojave drive, and attempt to move the .dmg to the Trash of the booted drive — then empty that Trash.


/Volumes/mojave-volume-name/Users/yourname/path/to/the/*.dmg that you made. Fill in the missing stuff, and don't type that path verbatim.

Oct 8, 2018 10:16 AM in response to jacksunders

jacksunders wrote:


running MacOs Mojave, and I want to delete an installer for macos high sierra. Well, long story if I told you how I got it, but I created this .dmg via terminal.

Well, its bit long process but I suppose it is worth it.

Is there any alternative, like some way to actually delete a system file?


"Well, long story if I told you how I got it, but I created this .dmg via terminal."


I would not consider this as a a system file, it is a standalone installer.dmg


Maybe it would be worth hearing how you, via terminal create this .dmg that is given you problems.

I will say it is a bit of an anomaly your problem. If you created it, you should be able to delete it.


If you want to create a High Sierra USBinstaller, there is a single command line:

sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume


Notice the installer needs to be in your Application folder, and your usbflash drive needs to named "MyVolume". When you erase and format the flash drive in preperation using DiskUtility, choose GUID partition map, and Extended Journaled as the file type. A freshly formated drive will by default get renamed to "Untitled".


However, creating a USBinstaller using the command line is not going to delete the .dmg


If you want to simply delete the .dmg, then I would highlight the .dmg and command i opens the info pane—see if you can change the permissions or ignore permissions there in order to delete it.

Oct 9, 2018 7:25 AM in response to leroydouglas

Frankly, I was going to make a High Sierra iso file using commands I found on the Internet. This dmg is some sort of component or whatever I have no clue it was just there on my desktop next to the iso file.The iso I copied to a different drive and deleted the original, and then wanted to get rid of this junk and I get these dumb errors. So, I'm not quite sure on how this isn't getting deleted.


And I dont want to create another iso or bootable install which might leave another dmg and cause more havoc on my mac.


Probably I misunderstood. Please explain exactly how to get rid of this in an effective way.

Oct 16, 2018 7:27 AM in response to dialabrain

Hey, I tried this and it works fabulously! Thanks!


For Others:

1. To disable SIP restart the machine in Recovery Mode (go to apple menu in menu bar, than click restart. While restarting, hold command+R).

2. After it loads, click "Utilities" in the menu bar. Click "Terminal".

3. In terminal, type in "csrutil disable". You will see a success message after that.

4. Restart.

5. Delete whatever you need to. Don't Delete system files though.

To re-enable (which is much safer) repeat steps 1-4 but type in "csrutil enable" instead in Step 3.


Hope this helps for everyone.


Thank you dialabrain and others for your support!

Delete .dmg file

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