Fix to delete time machine backups for no-responding finder

My MacBookPro was forced to upgrade to High Sierra, because XCode 9.3 is only available on 10.13 to support development for iOS 11.3. The new operating system looks quite the same, except the ridiculous wordings of the Chinese translation of system UI.

As usual, I made a Time Machine backup before the upgrade. Since my NAS disk was quite full, some old backups should be deleted after the system ran smooth. Well then, the Finder just turned frozen during the Time Machine deleting process, locking in the Time Machine tunnel interface.

After a hard rebooting and some googling, I found that the following steps might fix. It uses the command line to delete the dated backups and shrinks the size of the target Time Machine bundle :

  1. Connect to the target Time Machine Sparse Bundle file in the Finder
  2. Ensure that /Volumes/Time Machine Backup/Backups.backupdb shows in ls
  3. Delete old backups: sudo tmutil delete /Volumes/Time Machine Backup/Backups.backupdb/YOUR-MAC/SOME-DATES
  4. Eject the Sparse Bundle file in the Finder
  5. Shrinks the bundle: sudo hdiutil compact TARGET-SPARSE-BUNDLE-FILE