Municipal Administration Minister K T Rama Rao, who held a video conference with municipal commissioners on the issue, said all towns would be declared to be ODF by August 15.
All municipalities must reach the target by that date, according to a state government release.
Departmental action would be taken against municipal commissioners who fail to achieve the target, he said, adding that there is no shortage of funds for the programme.
Several towns have already become ODF, Mr Rao said.
The minister directed the officials to focus on sanitation during the monsoon season, among other important measures, according to the release.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.