Can I Remove Dmg After Installation

Posted on  by

Feb 10, 2014  Eject DMG Files Automatically When You Drag Them To the Trash. As you can see from the title, this Automator workflow allows you to achieve the same purpose, except that in reverse, so you can avoid this message every time you drag to the trash a mounted DMG file. Here are the steps to create it. Step 1: Create a new document in Automator. How to Install Software from DMG Files on a Mac 21 September, 2007 by Tom Harrison in mac os x A.DMG file is a container file commonly used to distribute applications for Mac OS X. Installing software from one of these requires you to mount the image and move its contents to your computer’s “Applications” directory.

  1. Can I Delete Dmg After Installation
  2. Mac Install Dmg

Jan 12, 2008  I can also delete.dmg files now, because in the past - seeing the applications weren't installed correctly, deleting the.dmg file caused the application to partially uninstall as it was running the incorrectly installed application. After installing DMG Extractor, all you have to do is double-click your DMG file to open it up. You can browse the files right in the DMG Extractor window if you just want to see what’s inside the DMG file. If you need to extract the file, click the “Extract” button on the toolbar, and then choose one of the extraction options.

One of the aspects where Macs differ from Windows PCs the most is when it comes to installing applications. On Macs, you need mount a disk image and then unmount it and delete once the installation is finished, which can be a bit of a hassle, especially if you have to test many apps in a short amount of time.

Thinking of that, this time we’ll share a couple of neat little workflows that you can implement on your Mac using Automator. With any of them, every time you are done with an app installation on your Mac, you’ll be able to eject/unmount and delete the disk image in just a couple of clicks.

Let’s get started with how to set up these nice Automator workflows.

Delete DMG Files Automatically When You Eject Them

Step 1: Open Automator and choose to create a new document. From the available document types that show up on the dialog box, select Service.

Step 2: At the top of the right panel, make sure to choose from the dropdown menus the options ‘no input’ and ‘Finder’ respectively so that the end result is as the one pictured below.

Step 3: Next, on the left panel of Automator, search for the Run AppleScript action and drag it to the right panel. An AppleScript window will show up with some placeholder code in it.

Delete that code and instead copy and paste the following one in the script box:

tell application 'Finder'
set selection_list to selection
if (count selection_list) < 1 then
display dialog ¬
'Please select a volume mounted from a disk image.' with title ¬
'No Selection Found' with icon stop ¬
buttons ['OK'] default button 1
return
end if
set my_selection to item 1 of selection_list
set my_kind to kind of my_selection
set my_name to name of my_selection
if my_kind is not 'Volume' then
display dialog ¬
'Please select a volume mounted from a disk image file.' with title ¬
'Selection is not a Disk Image' with icon stop ¬
buttons ['OK'] default button 1
return
end if
set volume_list to paragraphs of (do shell script 'hdiutil info grep ^/dev/disk grep -o '/Volumes/.*')
set source_list to paragraphs of (do shell script 'hdiutil info grep ^image'-'alias grep -o '/.*')
set match_found to false
repeat with v from 1 to (count volume_list)
if '/Volumes/' & my_name = item v of volume_list then
set match_found to true
exit repeat
end if
end repeat
if match_found is not equal to true then
display dialog ¬
'The selected volume does not appear to be a Disk Image.' with title ¬
'Could not find Disk Image' with icon stop ¬
buttons ['OK'] default button 1
return
else
set my_source to POSIX file (item v of source_list) as alias
move my_source to the trash
eject my_selection
--reveal my_source
end if
end tell

Step 4: Now save this Automator service and give it a name that is easy to remember.

Step 5: Once this is done, every time you have a disk image mounted, all you have to do is select it and on the Finder menu select Services and then Eject and Delete (or whatever you named the service you just created) and the disk image file will be both unmounted and deleted with one click.

I should have mine next week and, unless I score a crazy deal on an MpX, will file my SBR paperwork thereafter. I really like the customization to the MPA. Masterpiece mpa930dmg.

Now, let’s take a look at another Automator workflow that achieves the same objective doing exactly the opposite.

Eject DMG Files Automatically When You Drag Them To the Trash

As you can see from the title, this Automator workflow allows you to achieve the same purpose, except that in reverse, so you can avoid this message every time you drag to the trash a mounted DMG file.

Here are the steps to create it.

Step 1: Create a new document in Automator and select Folder Action from the available document types.

Step 2: At the top of the right panel, select Other… from the dropdown menu. Then, on the dialog box that pops over, type ~/.Trash to work with that folder.

Step 3: Next, on the left panel, drag the Run Shell Script action to the right panel. On the two dropdown menus that show up, select /usr/bin/python and as arguments respectively.

Step 4: Replace the placeholder script in the script box with the following one:

import string, os, sys
lines = os.popen('hdiutil info').readlines()
should_eject = False
for line in lines:
if line.startswith('image-alias'):
path = line.split(':')[1]
image_path = path.lstrip().rstrip()
if image_path in sys.argv:
should_eject = True
elif line.startswith('/dev/') and should_eject is True:
os.popen('hdiutil eject %s' % line.split()[0])
should_eject = False
elif line.startswith('###'):
should_eject = False

Once done, save the Folder Action and quit Automator. Now, whenever a DMG file is mounted, all you’ll have to do is drag it to the Trash and it will be unmounted at the same time.

Cool Tip: You can also create keyboard shortcuts for these actions by following the instructions at the end of this tutorial.

And there you go. Two different workflows to enable a very convenient feature on your Mac. Now all left to do is just choose which one you find more convenient. And the best of all? In both cases you’ll learn a bit more about Automator. Enjoy!

Also See#automation #OS X

Did You Know

In 1835, Thomas Davenport developed the first practical EV.

More in Mac

How to Record Your Screen with Zoom on Windows 10 and macOS

Many great applications are not yet available on the official app store and can be complicated for new users to install.

This application provides a collection of some of the best free and open-source Mac OS X software and can be considered to be one of the top things to do after getting a new Mac or migrating from Windows.

Selecting and Installing all the extra software on a new Mac computer can be time consuming and confusing. I wanted to automate the process on new machines as well as simplify the installation for new users.

Mac After Install has evolved into being a handy tool for the automated download and install of software.

All comments and improvements are very welcome as this is purely a personal project at this point and must be considered a work in progress.

The source code is available on GitHub.

Features

  • Automated batch download and installation of software
  • Easy uninstall of any and all software installed
  • Create custom lists of software to install
  • Export software installation lists to share
  • Import software installation lists
  • Create backup DMG of installed applications
  • Auto Updated list of selected default applications

Default Software Selection:

The application will install the latest versions of all software listed below as well as inform you of available updates.

Google Chrome is arguably the best browser available

Firefox another top browser

Tor Browser for anonymous internet browsing

Thunderbird for email
Vienna as a RSS and Atom Feed Reader
Telegram Messenger for private messaging
Skype offers text, voice and video chat

Jitsi all in one instant messenger

Adium all in one instant messenger

LibreOffice is the complete open source Office software replacement

Scribus professional quality desktop publishing software
Google Drive will sync your Google Drive to your computer
DropBox will sync your DropBox cloud storage
VLC will play any video file you can imagine
Cementine for playing music files from anywhere
KODI is a complete home media center experience
Spotify for your music streaming needs
Picasa to organize, edit, and share your photos
GIMP is powerful image editing software
Darktable allows photographers to process RAW files
Inkscape is vector based illustration and graphics editor
Blender a complete 3D Animation Suite
Audacity for music and sound editing
Handbrake to convert DVD's and videos for mobile devices
Burn for burning CD's and DVD's in various formats
KeePass to store all your passwords securely
FileZilla for FTP file up- and downloads
Cyber Duck for FTP and Cloud storage
Transmission for Torrent downloads and uploads
Keka adds missing file compression and decompression
Synkron great for file and folder synchronisation
BlueGriffon is a web designer and editor.
Brackets for web development started by Adobe
Komodo Edit is a amazing code editor
Sublime Text another amazing code editor
Atom a hackable text editor by GitHub

For more information on these programs visit the software selection page.

Requirements:

  • Mac OS X 64bit, 10.6 or later

Installation:

  • Download the Mac After Install DMG file from the link provided at the bottom of this page or from our GitHub project download page.
  • To allow the install of the software go to: System Preferences > Privacy & Security > General. Then click on the lock in the bottom right-hand corner to unlock the options. Then select 'Allow apps downloaded from:Anywhere'
  • Double click on the downloaded DMG file and drag the Mac After Install app to the Applications folder to install.
  • Once installed open Mac After install from your Applications folder.
  • Follow the on-screen instructions (see screenshots below)

Using Mac After Install

1. Installing Software

Can I Delete Dmg After Installation

  • Start Mac After Install from your applications folder.
  • Follow the on screen instructions.
  • Select the software you would like to install and click Install Now to begin.
  • Software that has already been installed will be selected as well, if updates are available for the newer versions.
  • If you wanted to re-install a item, simply select the application. It will be re-install.
  • Software marked with an orange dot will be updated or re-installed.

Mac Install Dmg

  • Once you have started the install process be very patient as the installation will take a while to complete.
  • Once an application has been installed successfully it will be marked with green dot as shown below.
  • If there is a problem with the install of an application, it will be marked with a red dot.
  • It is not a good idea to stop or interrupt the install process once it has begun.
  • if you would like to create a single compressed backup DMG of all the downloaded applications select Create Backup DMG from the Software menu. Software > Create Backup DMG.
  • The backup file will be created in your Downloads folder named Mac-After-Install-YYYY-MM-DD.dmg

2. Auto Update List

  • When Mac After Install is started it checks for updates to the default software selection list. You can choose not to have the list updated by un-checking Auto Update List in the Software menu. Software > Auto Update List.

3. Uninstalling software installed with Mac After Install

  • You can uninstall any or all software installed with Mac After Install easily.
  • From the application Software menu select Uninstall Software : Software > Uninstall Software
  • To uninstall individual applications click on the 'x' to uninstall the application.
  • To uninstall multiple applications select the items you would like to remove and click Uninstall.
  • Selected items will be marked by a red dot.
  • To Uninstall all software installed with Mac After Install simply click on the the select all check-box and click the Uninstall button.

4. View and edit details of each application on the list

  • You can get information about each application by clicking on the 'i' Info button.
  • To edit and update the item simply change the relevant item and click Update.

5. Add a new application to the list

  • You can add a new application to the list by clicking on the '+' Add button, or from the the application Software menu by selecting Add to List. Software > Add to List
  • To add a new item simply add the relevant information and click Add.
  • App Filename : Must be the name as it appears in the Applications folder after it is installed. This can be a .app file or a normal folder name in some cases.
  • Download URL : Must be a link to the download file. Supported formats include: .dmg .bz .tgz .tar .gz .bz2 .zip
  • Version : This is the version of the version being downloaded. Use format x.x.x for version numbers.

6. Remove applications from the list

  • You can remove an application from the list by clicking on the '-' Remove button, or from the the application Software menu by selecting Remove from List : Software > Remove from List
  • To remove individual applications click on the '-' to remove the application from the list.
  • To remove multiple applications select the items you would like to remove from the list and click Remove.

7. Import and Export lists to .mai or .xml format

  • You can create and edit custom lists of software and export the list in .mai or .xml format for sharing with other Mac After Install users.
  • To import a list select Open from the File Menu : File > Open or double click on a .mai list file to open it with Mac After Install.
  • To save a list select Save or Save As from the File Menu : File > Save and select the filename and folder you would like to save the list to.

Download: