Stacey Housham, 42, appeared at Lincoln Crown Court last week for sentencing.
The court was told Housham was caught red-handed after a police officer saw him coming out of a building in St Ann's Wharf and briefly getting into a waiting car.
Housham was seen to discard a Kinder Egg, which was discovered to contain 1.6 grams of cocaine, 18 wraps of crack-cocaine valued at £180, and a £10 wrap of heroin.
The officer searched Housham and discovered a set of electronic scales, a large amount of cash, and two phones that were ‘ringing constantly’.
Analysis of the phones indicated Housham was involved in dealing drugs, however the prosecution accepted he was making no financial gain and was only involved to feed his own habit and to find somewhere to sleep.
Housham, who was of no fixed address at the time of his offences, and is formerly of Collingwood Crescent, Boston, admitted possessing both cocaine and heroin with intent to supply others on February 10, 2020.
He also pleaded guilty to being concerned in the supply of cocaine and heroin to others between December 6, 2019, and February 11, 2020.
Nicholas Bleaney, in mitigation, said Housham was now a hardworking man and had the support of his partner and children, who had written letters to the court.
"He is working hard six days a week pulling vegetables out the ground," he said.
Passing sentence Recorder Simon King said he was moved by the support from Housham's family.
"This all harks back to a darker period in your life, before the Covid pandemic, and I accept you have made positive steps to put this behind you in the last two-and-half years,” he said.
Housham was sentenced to two years’ imprisonment suspended for two years and ordered to complete 100 hours of unpaid work and 35 rehabilitation days.