Software company SolarWinds Inc. said Wednesday that it has agreed to be acquired by private-equity firms Silver Lake and Thoma Bravo LLC in a deal valued at about $4.6 billion, less than two weeks after the company said it was surveying its options.

Under the transaction, SolarWinds stockholders will receive $60.10 a share. SolarWinds said the purchase price represents a 43.5% premium to the closing price of the company’s stock on Oct. 8, the day before the board announced it was exploring alternatives. It is a 20% premium...