Indriyasyendriyasyarthe raga-dvesau vyavasthitau
tayor na vasam agacchet tau hy asya paripanthinau
(Text 34, Ch 3, Karma Yoga)
Meaning: There are principles to regulate attachment and aversion pertaining to the senses and their objects. One should not come under the control of such attachment and aversion, because they are stumbling blocks on the path of Self-Realization.
***The whole purpose of detachment from all kinds of sense attachment is ultimately to become situated on the platform of divine consciousness.