From the Money Advice Service,
"Step 3: Pay in priority order
Once you have probate or grant of administration, you can use the money in the estate to pay off the debts that aren’t covered by insurance. Paying the debts first is more important than distributing the estate to the heirs.
You should pay off the debts in this order of importance:
Secured debts, such as the mortgage.
Reasonable funeral costs and the costs of administering the estate.
Unsecured debts, such as credit cards, utility bills, unpaid rent, Council Tax and other taxes, and repayment of overpaid benefits.
If there are assets, such as a car or a house that if sold, could go towards paying off the debts, it’s an option worth considering.
If there are more debts than the estate can pay back, this is called an ‘insolvent estate’. In this situation, it is best to seek the advice of a solicitor or a probate specialist.
Find a solicitor or probate specialist on the Law Society website"