How-To's, macOS

How to set TimeMachine backup size limit

TimeMachine will standard use all the available disk space on an external drive or a external server volume. You can setup a limit how much disk space Time Machine may use.

Use defaults utility on Terminal

To set the limit:
defaults write /Library/Preferences/ MaxSize 405600

where MaxSize 405600 is the MB equivalent of 400GB (400 * 1024)

To remove the limit:
defaults delete /Library/Preferences/ MaxSize


Note: Use with sudo if above doesn’t work.