Near-infrared (NIR) and attenuated total reflectance mid-infrared (ATR-MIR) spectroscopy were used to identify potato varieties and detect potato doneness degree. The varieties of potato tubers can be successfully classified by hierarchical cluster analysis (HCA). The partial least squares regression (PLSR) model exhibited good prediction result for the doneness degree evaluation. Principal component and first-derivative iteration algorithm (PCFIA) was introduced to select feature variables instead of using the full wavelength spectra for modelling. Based on two sets of feature variables selected from NIR and MIR regions, both NIR–PCFIA–HCA and MIR–PCFIA–HCA showed higher performances of hierarchical clustering. Moreover, NIR–PCFIA–PLSR and MIR–PCFIA–PLSR models were effectively used to predict tuber doneness degree, yielding the RP as high as 0.935 and the RMSEP as low as of 0.503. It is concluded that the PCFIA is an effective approach for feature variable selection, and both NIR and MIR spectroscopic techniques are capable of classifying potato varieties and determining potato doneness degree.