![](https://pepa.holla.cz/wp-content/uploads/2020/04/size-1024x375.png)
1. normal build
go build .
![](https://pepa.holla.cz/wp-content/uploads/2020/04/Screenshot-2020-04-27-at-08.56.54-1024x636.png)
Size of my binary: 20MB
2. ldflags
You can build app with additional parameters -ldflags="-s -w"
go build -ldflags="-s -w"
![](https://pepa.holla.cz/wp-content/uploads/2020/04/Screenshot-2020-04-27-at-08.57.37-1024x636.png)
Size of my binary: 16MB
3. FINALY: upx
You can use upx
: The Ultimate packer for eXecutable
go build -ldflags="-s -w" -o mngr
upx mngr
![](https://pepa.holla.cz/wp-content/uploads/2020/04/Screenshot-2020-04-27-at-08.58.28-1024x636.png)
Size of my binary: 6.0MB
suma sumarum
With upx i have got binary file 4 times smaller… Believe me. On size matter. Smaller is better 😀
installing upx
# on Mac
brew install upx