In bankruptcy, you can keep a vehicle to an amount that the government (AFSA) indexes.
You can keep a motor vehicle that is your primary means of transportation if its value is less than the statutory threshold (currently $9,100).
Where the value of the vehicle exceeds the statutory threshold, the bankruptcy trustee will be entitled to the value of the vehicle above that threshold. Sometimes, that will require sale of the vehicle.