I just ran apt-get upgrade on my debian 5 vps and I got this error: tar: unrecognized option `--warning=no-timestamp'Now when I try to install other packages e.g: imagemagick I get the same error:li197-162:~# apt-get install imagemagickReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following packages were automatically installed and are no longer required:  pkg-config comerr-dev libssh2-1-dev libpcre3-dev libdb4.6-dev libsqlite3-dev libmysqlclient15-dev libldap2-dev libpcrecpp0 libexpat1-dev libpq5 libidn11-devUse 'apt-get autoremove' to remove them.The following extra packages will be installed:  fontconfig-config imagemagick-common libfontconfig1 libfreetype6 libglib2.0-0 libice6 libjasper1 libjpeg8 liblcms1 liblqr-1-0 libltdl7 libmagickcore4 libmagickwand4 libpng12-0 libsm6 libtiff4  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxml2-dev libxt6 ttf-dejavu-core x11-commonSuggested packages:  imagemagick-doc autotrace cups-bsd lpr lprng enscript ffmpeg gimp gnuplot grads hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin transfig xdg-utils libjasper-runtime  liblcms-utilsRecommended packages:  libmagickcore4-extra ghostscript netpbm ufraw-batch libglib2.0-data shared-mime-info gsfonts xml-coreThe following NEW packages will be installed:  fontconfig-config imagemagick imagemagick-common libfontconfig1 libfreetype6 libice6 libjasper1 libjpeg8 liblcms1 liblqr-1-0 libltdl7 libmagickcore4 libmagickwand4 libpng12-0 libsm6 libtiff4  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxt6 ttf-dejavu-core x11-commonThe following packages will be upgraded:  libglib2.0-0 libxml2 libxml2-dev3 upgraded, 25 newly installed, 0 to remove and 190 not upgraded.Need to get 0B/11.2MB of archives.After this operation, 22.4MB of additional disk space will be used.Do you want to continue [Y/n]? YPreconfiguring packages ...x11-common template parse error: Template parse error near `Choices-sr@latin.UTF-8: Samo glavni korisnik, Samo za korisnike konzole, Svako', in stanza #1 of /tmp/x11-common.template.65052tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libfreetype6_2.4.6-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/ttf-dejavu-core_2.33-2_all.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/fontconfig-config_2.8.0-3_all.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libfontconfig1_2.8.0-3_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/x11-common_1%3a7.6+9_all.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libice6_2%3a1.0.7-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libpng12-0_1.2.46-3_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libsm6_2%3a1.2.0-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libjpeg8_8c-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libtiff4_3.9.5-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxau6_1%3a1.0.6-3_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxdmcp6_1%3a1.1.0-3_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxcb1_1.7-3_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libx11-data_2%3a1.4.4-2_all.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libx11-6_2%3a1.4.4-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxext6_2%3a1.3.0-3_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxt6_1%3a1.1.1-2_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-4_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libxml2_2.7.8.dfsg-4_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.28.6-1_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/liblcms1_1.19.dfsg-1_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/liblqr-1-0_0.4.1-1.1_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libltdl7_2.4-4_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libjasper1_1.900.1-10_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/imagemagick-common_8%3a6.6.9.7-5_all.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libmagickcore4_8%3a6.6.9.7-5+b1_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/libmagickwand4_8%3a6.6.9.7-5+b1_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2tar: unrecognized option `--warning=no-timestamp'Try `tar --help' or `tar --usage' for more information.dpkg-deb: error: subprocess tar returned error exit status 64dpkg: error processing /var/cache/apt/archives/imagemagick_8%3a6.6.9.7-5+b1_i386.deb (--unpack): subprocess dpkg-deb --control returned error exit status 2Errors were encountered while processing: /var/cache/apt/archives/libfreetype6_2.4.6-2_i386.deb /var/cache/apt/archives/ttf-dejavu-core_2.33-2_all.deb /var/cache/apt/archives/fontconfig-config_2.8.0-3_all.deb /var/cache/apt/archives/libfontconfig1_2.8.0-3_i386.deb /var/cache/apt/archives/x11-common_1%3a7.6+9_all.deb /var/cache/apt/archives/libice6_2%3a1.0.7-2_i386.deb /var/cache/apt/archives/libpng12-0_1.2.46-3_i386.deb /var/cache/apt/archives/libsm6_2%3a1.2.0-2_i386.deb /var/cache/apt/archives/libjpeg8_8c-2_i386.deb /var/cache/apt/archives/libtiff4_3.9.5-2_i386.deb /var/cache/apt/archives/libxau6_1%3a1.0.6-3_i386.deb /var/cache/apt/archives/libxdmcp6_1%3a1.1.0-3_i386.deb /var/cache/apt/archives/libxcb1_1.7-3_i386.deb /var/cache/apt/archives/libx11-data_2%3a1.4.4-2_all.deb /var/cache/apt/archives/libx11-6_2%3a1.4.4-2_i386.deb /var/cache/apt/archives/libxext6_2%3a1.3.0-3_i386.deb /var/cache/apt/archives/libxt6_1%3a1.1.1-2_i386.deb /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-4_i386.deb /var/cache/apt/archives/libxml2_2.7.8.dfsg-4_i386.deb /var/cache/apt/archives/libglib2.0-0_2.28.6-1_i386.deb /var/cache/apt/archives/liblcms1_1.19.dfsg-1_i386.deb /var/cache/apt/archives/liblqr-1-0_0.4.1-1.1_i386.deb /var/cache/apt/archives/libltdl7_2.4-4_i386.deb /var/cache/apt/archives/libjasper1_1.900.1-10_i386.deb /var/cache/apt/archives/imagemagick-common_8%3a6.6.9.7-5_all.deb /var/cache/apt/archives/libmagickcore4_8%3a6.6.9.7-5+b1_i386.deb /var/cache/apt/archives/libmagickwand4_8%3a6.6.9.7-5+b1_i386.deb /var/cache/apt/archives/imagemagick_8%3a6.6.9.7-5+b1_i386.debE: Sub-process /usr/bin/dpkg returned an error code (1)li197-162:~# I really have no idea what is wrong and how to fix this. Is it possible to undo an apt-get upgrade?
tar: unrecognized option --warning during 'apt-get install'
debian;upgrade;apt;tar
I've just had exactly this problem.  As Gilles suggested, upgrading tar is the answer but (surprise surprise) tar can't be upgraded in the usual way because dpkg requires version 1.23 or later before it'll unpack and install the latest tar deb. dpkg really needs an explicit dependency to ensure that when a later version of dpkg is installed, the latest tar version goes on first, but I guess it's a risk with combining different testing and unstable releases in unsupported ways. It's still undesirable and this seems an unfortunate way to cripple a system.My first idea was to look for the latest binary of tar at the GNU project, but unfortunately they only have source downloads, which aren't helpful if (like me) you don't have the various compiling tools installed.If you download the latest tar binary .deb to match your system from packages.debian.org and drop it into a temporary place somewhere (just to be tidy), you should be able to get inside it with the ar command,  e.g. ar x tar_1.26-2_amd64.deb in my case.Then unpack the resulting data.tar.gz file with a command like tar zxvf data.tar.gz, using your existing earlier version of tar, which should work as long as you don't try and do anything silly like use a --warning parameter that won't be available until version 1.23. :) This will then let you get at the tar binary, which (within the data.tar.gz file) was probably at bin/tar.Having done this, I added the path for that binary to the front the PATH variable in my shell, which in my bash shell could be done with the command export PATH=/root/temp/bin:$PATH, but adjust the path to fit wherever the new tar binary is now sitting. After that, running a regular dpkg --install tar_1.26-2_amd64.deb worked wonders, because dpkg will look in the path and find the latest tar binary before it finds the older version in the regular bin path.I hope this helps.