Skip to content

Instantly share code, notes, and snippets.

@tuliocll
Last active June 12, 2021 20:40
Show Gist options
  • Save tuliocll/cbcaaf4dc8f460c9c3203aa1dda00e94 to your computer and use it in GitHub Desktop.
Save tuliocll/cbcaaf4dc8f460c9c3203aa1dda00e94 to your computer and use it in GitHub Desktop.
Resize Mac1 AWS EC2 disk

First, list all disks:

diskutil list

Check the avaliable space and the identifier for the Container partition, to me is the disk1s2 identifier on /dev/disk1 disk.

Repair the disk:

diskutil repairdisk /dev/disk1

Resize the partition:

You can specify the GB that you want to resize, like this:

diskutil apfs resizeContainer disk11s2 10G

or you can fit the free space on your EC2 disk:

diskutil apfs resizeContainer disk11s2 0

Now, just hit enter and check your disk size! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment