I used to install packages by dpkg -i *.deb
as I have all deb (with dependencies) in one folder.
Now Is there any Reverse process of dpkg -i *.deb
to remove all packages installed from debs.
(dpkg -r <pkgname>
is not helpful because it requires package-name instead of deb file and not accept *.deb)
dpkg
can extract the package name (with a bit of help). The only serious problem here is just chaining them together and that's where find
steps in.
find -iname '*.deb' -exec dpkg --info '{}' \; | awk '/Package:/ {print $2}' | xargs -r -- sudo apt-get remove
That isn't tested but it should work.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments