In the event that it shall be necessary to reduce the personnel of any department affected by this chapter, reduction shall be done from the lowest rank, seniority having priority.