How to clean before rebuild

What is the procedure please to adopt after checking out a different version to clean the build environment before a new build?
I am guessing that for the backend I should do
go run build.go clean
go run build.go setup
go run build.go build

but for the frontend assets is it sufficient to do
yarn install --pure-lockfile
yarn start
or is there something else to do first?

no there is nothing else. You do not need to clean anything,

You only need to run these the first time you setup the env

OK, that’s great, thanks.