tinyapps.org / blog

Preparing a Mac for resale or donation (Sierra edition) #

  1. Securely erase internal storage, install macOS, create temporary admin account (e.g., tempuser), install apps and updates, etc.
  2. Log in normally as tempuser and run:
    $ sudo dscl . -delete /Groups/admin GroupMembership tempuser
    $ sudo dscl . -delete /Users/tempuser
  3. Restart in Single User Mode and run:
    # fsck -fy
    # mount -uw /
    # rm -R /Users/tempuser
    # rm /var/db/.AppleSetupDone
    # shutdown -h now


Regarding iLife and iWork apps

/mac | Feb 18, 2017

Reset Safari 10 in OS X 10.11 El Capitan #

Turn this:

Safari junk

into this:

Safari clean


# Reset Safari 10 for current user. Developed and tested under OS X 10.11.6 El Capitan.

# Backup bookmarks to Desktop, exiting if unsuccessful
cp -v ~/Library/Safari/Bookmarks.plist ~/Desktop/Bookmarks-`date +%Y%m%d%H%M%S`.plist
if [[ $? -ne 0 ]]; then exit 1; fi

# Delete main Safari data directory
rm -rfv ~/Library/Safari

# Delete caches
rm -rfv ~/Library/Caches/com.apple.Safari
rm -rfv ~/Library/Caches/com.apple.Safari.SearchHelper
rm -rfv ~/Library/Caches/com.apple.safaridavclient
rm -rfv ~/Library/Caches/com.apple.WebKit.PluginProcess
rm -rfv ~/Library/Caches/Metadata/Safari
rm -rfv ~/Library/Caches/SafariNotificationAgent
rm -rfv ~/Library/Caches/com.apple.commerce.safari/SafariLibrary

# Delete cookies
rm -rfv ~/Library/Cookies/Cookies.binarycookies
rm -rfv ~/Library/Cookies/com.apple.safari.cookies
rm -rfv ~/Library/Cookies/com.apple.CaptiveNetworkAssistant.binarycookies
rm -rfv ~/Library/Cookies/com.apple.Safari.SafeBrowsing.binarycookies
rm -rfv ~/Library/Cookies/com.apple.Safari.SearchHelper.binarycookies

# Delete preferences
rm -rfv ~/Library/Preferences/com.apple.Safari.LSSharedFileList.plist
rm -rfv ~/Library/Preferences/com.apple.Safari.RSS.plist
rm -rfv ~/Library/Preferences/com.apple.Safari.plist
rm -rfv ~/Library/Preferences/com.apple.Safari.Extensions.plist
rm -rfv ~/Library/Preferences/com.apple.WebFoundation.plist
rm -rfv ~/Library/Preferences/com.apple.WebKit.PluginHost.plist
rm -rfv ~/Library/Preferences/com.apple.WebKit.PluginProcess.plist
rm -rfv ~/Library/Preferences/com.apple.commerce.safari.plist

# Delete saved state
rm -rfv ~/Library/Saved\ Application\ State/com.apple.Safari.savedState

# Delete RSS feeds subscribed in Safari or Mail
# More info on PubSub database and command:
# http://krypted.com/mac-os-x/managing-mail-and-safari-rss-subscriptions-from-the-command-line/
rm -rfv ~/Library/PubSub/Database

# Delete yet more Safari data (cannot find any definitive documentation on this directory)
rm -rfv ~/Library/WebKit/com.apple.Safari

# Delete SharedFileList
rm -rfv ~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.apple.safari.sfl

# Delete LSOs / Flash cookies
rm -rfv ~/Library/Caches/Adobe/Flash\ Player

# Clear download history from all browsers, including Safari
# More info: http://osxdaily.com/2012/07/12/list-download-history-mac-os-x/
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'

# Delete QuickTime cache
rm -rfv ~/Library/Caches/QuickTime

printf "\n\n\033[1;32mSafari cleanup complete.\n\n\033[1;31mThe contens of /Library/Internet Plug-Ins and ~/Library/Internet Plug-Ins\nwill appear below after pressing Enter. Check output for unwated plugins.\nPreserve Quartz Composer.webplugin & Default Browser.plugin at a minimum.\033[0m\n\n"

read -p "Press Enter to continue."

# List contents of /Library/Internet Plug-Ins and ~/Library/Internet Plug-Ins
ls -Ah /Library/Internet\ Plug-Ins ~/Library/Internet\ Plug-Ins


  1. Testing with fs_usage and File Buddy in a clean VM.
  2. completely reset Safari 9
  3. How to reset safari 9.0.3
  4. Reset Safari from command line
  5. Reset Safari doesn't really clean all the cookies of Safari web browser
  6. History in Safari
  7. Aborting a shell script if any command returns a non-zero value?
  8. In a bash script, how can I exit the entire script if a certain condition occurs?
  9. guapolo's answer to How to get osx shell script to show colors in echo

/mac | Feb 11, 2017

Migrating from Mail.app to Thunderbird #

/mac | Feb 05, 2017

3 Mac file-related apps #

from a blog post (and related comments) on Robservatory:

/mac | Jan 23, 2017

Direct download of Boot Camp drivers #

  1. From within Windows (or OS X) via Timothy Sutton's Brigadier Python script
  2. From within OS X via Boot Camp Assistant > Action > Download Windows Support Software
  3. From within a browser (for Windows 7/Boot Camp 4 & 5.1) via this Apple page

/mac | Dec 10, 2016

Add fade to black transition to MP4 video #

3 methods, from least to most efficient. Original MP4 video clip ≈ 2.4MB.

Thanks to LordNeckbeard's tip and link to FFmpeg's fade filter documentation.

/mac | Nov 24, 2016

Mail.app: Cannot remove attachments from sent emails #

If Message > Remove Attachments is grayed out for sent messages:
  1. Select the affected mailbox (e.g., Sent)
  2. Mail > Preferences... > Rules > Add Rule
  3. Create a rule in which From is equal to your email address and Any attachment name contains "." (without quotes).
  4. Set the action to "Set Color"
  5. OK > "Do you want to apply your rules to messages in selected mailboxes" > Apply

Attachments can now be removed normally from affected messages. Tested in Mail 9.3 under OS X 10.11.6. Lion/Mountain Lion's Mail: Workaround for removing attachments from sent messages should have been in the top 10 Google results but wasn't, hence this recapitulation.

/mac | Nov 24, 2016

Photos.app: "Nothing to import - None of these files can be imported into your Photos library." #

While clicking and dragging multiple folders containing JPGs into Photos.app, the following error appeared:

Nothing to import - None of these files can be imported into your Photos library.

Quitting and restarting Photos.app only worked for a few more files, then back to the same error message. File > Import... did not work either.

Happily, PowerPhotos was able to import everything (over 100GB worth), automatically skipping duplicates and providing a detailed report of the process via Library > Import Photos...

/mac | Oct 26, 2016

Building a triple-boot Mac: OS X 10.9, Linux Mint 18, Windows 7 #

This process was tested on a MacBook Pro (13-inch, Mid 2012)* and Samsung 830-Series MZ-7PC128B/WW 128GB Solid State Drive with OS X 10.9.5, Linux Mint Cinnamon 18 64-bit, and Windows 7 64-bit.
  1. Install SSD. Any existing data will be deleted.

  2. Boot from Mavericks installer

    1. Disk Utility > Partition (GUID), format (Mac OS Extended (Journaled)), and name (OSX) volume

    2. Install Mavericks to OSX normally

  3. Boot from SSD

    1. Boot Camp Assistant > allocate partition space as desired (keeping in mind that the Linux Mint partition will be carved out of the Windows partition)

    2. Install Windows normally

  4. Boot from Linux Mint 18 installer

    1. Install Mint normally, selecting "Install Linux Mint alongside them" and specifying the desired sizes of the Windows and Mint partitions

  5. When installation completes, boot to Startup Manager by holding the Option key. There are 3 options:

    1. OSX = Mavericks

    2. Recovery-10.9.5 = OS X Recovery

    3. Windows = GNU GRUB, from which Linux Mint 18 or Windows 7 can be booted (ignore the OS X 32-bit and 64-bit entries)


/mac | Oct 18, 2016

Virtualizing Snow Leopard #

Hot on the heels of our 2011 post, Mac OS X P2V, comes a new guide for those who just can't let go of OS X 10.6's superior speed, stability, or PowerPC emulation: Installing Snow Leopard into VMWare Fusion 8 on El Capitan. Enjoy!

/mac | Sep 11, 2016

Subscribe or visit the archives