All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is nothing wrong with using the cupboard that you referred to, and it is not forbidden just because it was used for storing wine. When the verse about the prohibition of alcohol was revealed, the Companions spilled it but the Prophet did not forbid them from using those vessels in which there was once wine. They used them in what is permissible.
Ibn ‘Abbaas narrated that a man gave the Prophet a small water-skin of wine. The Prophet said to him, ‘Don’t you know that Allah has forbidden it?’ The man replied, ‘No.’ Then he whispered to a man at his side. The Prophet asked what he had whispered, and the man (to whom he whispered) replied, ‘I told him to sell it.’ Thereupon, the Prophet said: “The One who has made drinking it forbidden has made selling it forbidden.” Ibn ‘Abbaas said: “The man then opened the water-skin and poured out what was in it.” [Muslim]
The point is that he did not throw the water-skin that contained wine; rather, he spilled the wine that was in it so that he can use the water-skin later on for something that is lawful. Had it been absolutely forbidden to use it, then the Prophet would have clarified this to him.
An-Nawawi said while interpreting this Hadeeth:
“His saying, he opened the water-skin is evidence for the view of Ash-Shaafi’i and the majority of the scholars, that the pots of wine are not to be broken or torn; rather, what was in them should be spilled.
There are two narrations from Maalik: One of which is similar to the view of the majority of the scholars, and the second one is that the vessels should be broken and water-skins to be torn, but this is a weak view and there is no foundation for it.
As regards the Hadeeth narrated by Abu Talhah that they [the Companions] broke the vessels, then they did so by themselves without being ordered by the Prophet, sallallaahu ‘alayhi wa sallam, (to do so).”
What was reported in some Ahadeeth that the Prophet, sallallaahu ‘alayhi wa sallam, ordered that the vessels of wine be destroyed, and the water-skins be torn out, then this is as a punishment for its people.
To conclude, there is no harm in using those cupboards that were once used to store wine bottles.
Allah knows best.