Housing and Local Government Ministry secretary-general Datuk Arpah Abdul Razak said in a directive that the move would be monitored by local councils, adding that the definition of junk food was contained under the Food Act and Food Regulations.
The directive was also issued to ensure that all local councils adhered to standards and rules when granting licences to those carrying out businesses outside schools.
Among the items that cannot be sold by licensed hawkers are all types of sweets, chocolate, pickled tidbits, foodstuffs with artificial colouring, preservatives and alcohol, those resembling lipstick and rings, and products that come with free gifts like balloons and picture cards.
Also discouraged are burgers, sausages, nuggets, ice-cream and carbonated drinks.
Hawkers and their assistants, said Arpah, must also attend a food handling course organised by agencies appointed by the Health Ministry before they could be considered for a licence.
A certificate of their course, she said, should be prominently displayed during business hours. The hawkers should also carry proof of their typhoid jabs at all times.
"Food should also be wrapped using material not hazardous to health. The use of newspapers or other printed material is prohibited," she said, adding that smoking was also not allowed when serving food.
In welcoming the directive, Parent Action Group for Education (PAGE) chairman Datin Noor Azimah Abdul Rahim said she hoped that this would be effectively enforced by local councils.
"It is pointless to have a good ruling without enforcement. We can't blame children if they buy junk food because all they want to do is to fill their stomach after a long day at school."
Noor Azimah also suggested that canteens set up mobile units selling healthy food near school gates so that the children could buy these before leaving for home.
"This will also allow the canteen operators to earn extra income," she added.