I need to remove the debian files of these packages from /var/cache/apt/archives/
:
attr cabextract fonts-horai-umefont fonts-unfonts-core fonts-wqy-microhei gcc-4.8-base gcc-4.9-base libasn1-8-heimdal libasound2 libasound2-plugins libasyncns0 libavahi-client3 libavahi-common-data libavahi-common3 libc6 libcapi20-3 libcapi20-3 libcgmanager0 libcomerr2 libcups2 libdb5.3 libdbus-1-3 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libelf1 libexif12 libexpat1 libffi6 libflac8 libfontconfig1 libfreetype6 libgcc1 libgcrypt11 libgd3 libgif4 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglu1-mesa libgnutls26 libgpg-error0 libgphoto2-6 libgphoto2-port10 libgpm2 libgssapi-krb5-2 libgssapi3-heimdal libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libice6 libieee1284-3 libjack-jackd2-0 libjbig0 libjpeg-turbo8 libjpeg8 libjson-c2 libk5crypto3 libkdc2-heimdal libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 libllvm3.4 libltdl7 liblzma5 libmpg123-0 libmpg123-0 libncurses5 libnih-dbus1 libnih1 libodbc1 libogg0 libopenal1 liborc-0.4-0 libosmesa6 libosmesa6 libp11-kit-gnome-keyring libp11-kit0 libpciaccess0 libpcre3 libpng12-0 libpulse0 libroken18-heimdal libsamplerate0 libsane libsasl2-2 libsasl2-modules libsasl2-modules-db libselinux1 libsm6 libsndfile1 libspeexdsp1 libsqlite3-0 libssl1.0.0 libstdc++6 libtasn1-6 libtiff5 libtinfo5 libtxc-dxtn-s2tc0 libudev1 libusb-1.0-0 libuuid1 libv4l-0 libv4lconvert0 libvorbis0a libvorbisenc2 libvpx1 libwind0-heimdal libwrap0 libx11-6 libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxml2 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6 libxxf86vm1 ocl-icd-libopencl1 ocl-icd-libopencl1 p11-kit-modules p7zip python-dnspython samba samba-dsdb-modules samba-vfs-modules tdb-tools ttf-mscorefonts-installer ttf-wqy-microhei unixodbc winbind wine-gecko2.21 wine-gecko2.21 wine-mono0.0.8 wine1.6 wine1.6-amd64 wine1.6-i386 winetricks zlib1g glibc-doc locales isdnutils-doc isdnutils-doc rng-tools libgd-tools libglide3 gnutls-bin gphoto2 gtkam gpm krb5-doc krb5-user libvisual-0.4-plugins gstreamer-codec-install gnome-codec-install gstreamer0.10-tools gstreamer0.10-plugins-base jackd2 liblcms2-utils libmyodbc odbc-postgresql tdsodbc unixodbc-bin libportaudio2 libroar-compat2 pulseaudio hplip hpoj libsane-extras libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal opencl-icd opencl-icd bind9 bind9utils ldb-tools ntp smbldap-tools libnss-winbind libpam-winbind dosbox xml-core unixodbc wine-mono0.0.8 attr cabextract fonts-horai-umefont fonts-unfonts-core fonts-wqy-microhei gcc-4.8-base gcc-4.9-base libasn1-8-heimdal libasound2 libasound2-plugins libasyncns0 libavahi-client3 libavahi-common-data libavahi-common3 libc6 libcapi20-3 libcapi20-3 libcgmanager0 libcomerr2 libcups2 libdb5.3 libdbus-1-3 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libelf1 libexif12 libexpat1 libffi6 libflac8 libfontconfig1 libfreetype6 libgcc1 libgcrypt11 libgd3 libgif4 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglu1-mesa libgnutls26 libgpg-error0 libgphoto2-6 libgphoto2-port10 libgpm2 libgssapi-krb5-2 libgssapi3-heimdal libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libice6 libieee1284-3 libjack-jackd2-0 libjbig0 libjpeg-turbo8 libjpeg8 libjson-c2 libk5crypto3 libkdc2-heimdal libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 libllvm3.4 libltdl7 liblzma5 libmpg123-0 libmpg123-0 libncurses5 libnih-dbus1 libnih1 libodbc1 libogg0 libopenal1 liborc-0.4-0 libosmesa6 libosmesa6 libp11-kit-gnome-keyring libp11-kit0 libpciaccess0 libpcre3 libpng12-0 libpulse0 libroken18-heimdal libsamplerate0 libsane libsasl2-2 libsasl2-modules libsasl2-modules-db libselinux1 libsm6 libsndfile1 libspeexdsp1 libsqlite3-0 libssl1.0.0 libstdc++6 libtasn1-6 libtiff5 libtinfo5 libtxc-dxtn-s2tc0 libudev1 libusb-1.0-0 libuuid1 libv4l-0 libv4lconvert0 libvorbis0a libvorbisenc2 libvpx1 libwind0-heimdal libwrap0 libx11-6 libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxml2 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6 libxxf86vm1 ocl-icd-libopencl1 ocl-icd-libopencl1 p11-kit-modules p7zip python-dnspython samba samba-dsdb-modules samba-vfs-modules tdb-tools ttf-mscorefonts-installer ttf-wqy-microhei unixodbc winbind wine wine-gecko2.21 wine-gecko2.21 wine-mono0.0.8 wine1.6 wine1.6-amd64 wine1.6-i386 winetricks zlib1g
how can I do this using a command?
I don't know of any
apt
command that will only remove cached files for specific packages, but given that you know which packages have to be removed:You can do it without a loop, but this should be enough.