Veteran striker Cavani and his girlfriend tested positive for COVID-19 following a holiday that saw them join former Paris Saint-Germain teammates in Ibiza, a trip that also saw Neymar, Angel Di Maria, Leandro Paredes, Mauro Icardi, Keylor Navas and Marquinhos contract the virus.
At that point the 33-year-old Cavani was without a club following the expiration of his PSG contract in June, but United handed him a one-year deal, with an option for another, on deadline day.
Cavani spent some of his time working on farmland in his native Salto, Uruguay, and thought about packing in life as a professional footballer.
"It was something we kept to ourselves and I was going to say it at some point," Cavani told Uruguayan outlet 2 de punta of testing positive for coronavirus.
"There was nothing to be gained by saying it at the time if you were complying with the protocol that had to be followed.
"We spent many days in quarantine, even longer than necessary. There was no need to tell anyone.
"It was after we arrived in Paris from Spain. At first we were negative, but when my girlfriend started to get symptoms we took the test again and we were positive.
"My family's health comes first. Of course I thought about quitting football. It is true I considered that option and the possibility of stopping playing and dedicating myself to life in the countryside."
Cavani, whose last competitive match was in March due to the cancellation of the 2019-20 Ligue 1 season, was linked with Gremio and Benfica before signing with United on Monday.
Asked about what it was like spending so long without a team, he said: "It's normal that you start to feel anxious. The leagues had started and of course I wanted to have a team.
"I believe that in life things come when they are meant to and sometimes, no matter how much you want something, if it doesn't happen, it doesn't happen.
"There was a lot of uncertainty and anxiety. Days began to pass and I saw my family, friends and everyone wanting to know where I was going to play.
"Now we're here, happy with the decision and wanting to put on the shirt."