A NOx sensor purification program for a NOx sensor , which is disposed at an exhaust passage of an internal combustion engine mounted in a vehicle , and in which a reference pump cell pumping out oxygen into a reference air chamber is configured by a reference electrode which is disposed inside a sensor element in the reference air chamber communicating with outer air and a reference pump electrode disposed outside the sensor element , and which is provided with a control unit which performs control to adjust a current flowing in the reference pump cell to be a predetermined reference pump current , the NOx sensor purification program : causing an on-vehicle electronic computer mounted in the vehicle , when it comes to a predetermined purification time (t1), to execute a start procedure to send a start command to perform a purification control to the control unit ; causing the control unit , in response to the start command, to execute a purification procedure to perform the purification control which causes the current flowing in the reference pump cell from the reference pump current to be a purification pump current , which is set to a current value larger than the reference pump current ; causing, while causing the control unit to execute the purification procedure, the on-vehicle electronic computer to execute: a resistance value obtaining procedure to obtain a resistance value of the reference pump cell through the control unit ; a determination procedure to determine whether the obtained resistance value is a predetermined end determining value or more; and an ending procedure to send an ending command to control the control unit to stop the purification control to the control unit when the resistance value is the end determining value or more, and causing the control unit to execute a stop procedure to stop the purification control according to the ending command. causing an on-vehicle electronic computer mounted in the vehicle , when it comes to a predetermined purification time (t1), to execute a start procedure to send a start command to perform a purification control to the control unit ; causing the control unit , in response to the start command, to execute a purification procedure to perform the purification control which causes the current flowing in the reference pump cell from the reference pump current to be a purification pump current , which is set to a current value larger than the reference pump current ; causing, while causing the control unit to execute the purification procedure, the on-vehicle electronic computer to execute: a resistance value obtaining procedure to obtain a resistance value of the reference pump cell through the control unit ; a determination procedure to determine whether the obtained resistance value is a predetermined end determining value or more; and an ending procedure to send an ending command to control the control unit to stop the purification control to the control unit when the resistance value is the end determining value or more, and a resistance value obtaining procedure to obtain a resistance value of the reference pump cell through the control unit ; a determination procedure to determine whether the obtained resistance value is a predetermined end determining value or more; and an ending procedure to send an ending command to control the control unit to stop the purification control to the control unit when the resistance value is the end determining value or more, and causing the control unit to execute a stop procedure to stop the purification control according to the ending command. <EOS>