Portuguese flag

Mariposa vs. traça

The difference between mariposa and traça largely depends on the region. In Brazil, there is a clear distinction: mariposa is the general word for the flying nocturnal moth, while traça strictly refers to the small pest that eats clothes or paper (clothes moth or silverfish). In Portugal, traça is commonly used for both the flying moth and the pest, making it the standard everyday word for the insect.

Mariposa

B1
This is the standard term in Brazil for the nocturnal insect known as a moth. While understood in Portugal to mean a purely nocturnal moth, it is used much less frequently there in daily conversation.
A mariposa voou em direção à luz da varanda.
(The moth flew toward the balcony light.)
As mariposas geralmente aparecem à noite.
(Moths usually appear at night.)
No Brasil, diferenciamos bem a borboleta da mariposa.
(In Brazil, we distinguish clearly between the butterfly and the moth.)

Traça

B2
In Portugal, traça is the most common word for a flying moth found around lights. In Brazil, traça never refers to the large flying insect; it refers exclusively to the small destructive pests (clothes moths or silverfish) that damage fabrics and books.
Aquela traça enorme entrou pela janela aberta.
(That huge moth came in through the open window.)
Preciso de colocar naftalina para afastar a traça das roupas.
(I need to put mothballs to keep the clothes moth away from the clothes.)
As traças andam sempre à volta dos candeeiros de rua.
(The moths are always going around the street lamps.)
Uma traça comeu as páginas do meu livro antigo.
(A silverfish ate the pages of my old book.)

Summary

To summarize: In Brazil, use mariposa for the flying insect and traça only for the household pest that eats clothes. In Portugal, you can use traça for the flying insect as well as the pest.