One way to avoid keeping DMG files after installation | 7 comments | Create New Account
As you may already know, installer files for macOS come with a DMG file extension – otherwise known as an Apple Disk Image – and are similar to ISO files. To install an app – the majority of which just require dragging and dropping – users need to mount this.DMG file just as you might mount a CD when putting it into a CD drive, which makes its contents visible on the Mac.
- While the Mac App Store is great, I still find myself downloading.dmg files and installing plenty of third-party software. I often forget to delete.dmg files after I've installed applications. Here's a script to automatically move the.dmg file to the trash when you eject the disk image.
- Once the Basesystem.dmg file is ran on your Mac, it may begin performing different malicious activities. These may be of all tpes, but the main one is spyware and virus actions. The bad news here is that once you try to delete Basesystem.dmg, the Mac asks to enter the password and identify as an administrator.
Click here to return to the 'One way to avoid keeping DMG files after installation' hint |
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One way to avoid keeping DMG files after installation
Easier solution:
Move the DMG to /tmp/ before opening it. Then forget about it.
Files in /tmp/ get deleted on reboot.
If you decide you want to keep it, move it back to your Downloads directory or wherever you want it.
Move the DMG to /tmp/ before opening it. Then forget about it.
Files in /tmp/ get deleted on reboot.
If you decide you want to keep it, move it back to your Downloads directory or wherever you want it.
One way to avoid keeping DMG files after installation
Great Idea!
So the cmd whould be:
mv '/Users/MyShortUsername/Path/To/MyDownloaded.dmg' '/private/tmp/'
Obviously, you must replace 'MyShortUserName' with your correct username , replace 'Path/To/' with the correct path to your dmg file and finally replace 'MyDownloaded.dmg' with the correct name of your dmg file.
If you don't use the quotes for the source path and the destination path, just remember to escape the spaces in the paths with backslash! (')
So the cmd whould be:
mv '/Users/MyShortUsername/Path/To/MyDownloaded.dmg' '/private/tmp/'
Obviously, you must replace 'MyShortUserName' with your correct username , replace 'Path/To/' with the correct path to your dmg file and finally replace 'MyDownloaded.dmg' with the correct name of your dmg file.
If you don't use the quotes for the source path and the destination path, just remember to escape the spaces in the paths with backslash! (')
Garmin training center download mac. You know, you don't have to use /private/tmp. Just /tmp will do. In fact, it's preferred to use /tmp.
One way to avoid keeping DMG files after installation
I go the other way. I keep ALL dmg files.
Every so often I move them to an 'Installers' folder, thus keeping the downloads folder clear. Less often I check the total size of the Installers folder and back up to CD/DVD and then clear it.
Every so often I move them to an 'Installers' folder, thus keeping the downloads folder clear. Less often I check the total size of the Installers folder and back up to CD/DVD and then clear it.
One way to avoid keeping DMG files after installation
Or you could use a crontab:
0 20 * * * /Path/To/Script/clean.sh
With something like the following:
This will move any files in the ~/Downloads/ folder, to a child folder called 'archive' on a daily basis.. then after 30 days, delete it.
Although, run at your own risk.. its job is to actually delete data. Spiderman 1 iso download ps2.
Wait wait, let me get this straight… if I have files I don't want to keep, I can put them in the trash to get rid of them?
God bless Mac OS X Hints.
God bless Mac OS X Hints.
Good luck USING them after you put them in the trash. Microsoft office 2019 code mac. This hint was about continuing to use DMGs that are in the trash. You know you aren't going to want to use it, so always throw it in the trash, then continue using it.
Personally, I download to the Desktop so everything I download is extremely obvious to me. Honeywell adaptus 3800g scanner drivers. I also have it sorted by 'Last Modified' so DMG downloads appear in the upper right. Can't forget those!
Personally, I download to the Desktop so everything I download is extremely obvious to me. Honeywell adaptus 3800g scanner drivers. I also have it sorted by 'Last Modified' so DMG downloads appear in the upper right. Can't forget those!
Lots of good points in this thread. I've re-thought how this should work.
Can We Delete Dmg Files After Installation
My problem is that my downloads folder gets cluttered with dmg files. I can't remember which ones I've already installed. Some of them I have opened and installed, but I've forgotten to move them out of my downloads folder. Some of them I downloaded but haven't opened yet.
![Can Can](/uploads/1/3/4/3/134354219/642671768.png)
My new version of the script moves the dmg file when it is mounted. To use it, save this script to '/Library/Scripts/Folder Action Scripts/' and attach this folder action script to the /Volumes directory. Ideally, my script would trigger when you eject the disk image, but by then it's too late; the disk image is gone, and there's nothing left for AppleScript to process. I figure triggering on mount was pretty good, since I really wanted to know what dmg files I had opened or not.
![Delete Delete](/uploads/1/3/4/3/134354219/370805981.png)
Can Delete Dmg Files After Installation
Most of you didn't want to delete the dmg file. That's a good idea. My script now moves it to a dmg_archive folder. Feel free to change this to suit your needs.