LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to uninstall a diectory of *.deb files (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-uninstall-a-diectory-of-%2A-deb-files-728621/)

Dims 05-26-2009 11:12 AM

How to uninstall a diectory of *.deb files
 
I have a diectory with many of deb files. I have installed them with

dpkg -i *.deb

command.

How to UNinstall them now?

As I think, I should grep for package names first.

I can do

dpkg --info dapl2-utils_2.0.15-1_amd64.deb | grep Package:

but how to:

1) extract package name from output?
2) do this for each file in direcotry?

Thanks.

repo 05-26-2009 11:16 AM

why do you want to uninstall them?
dpkg -r <package name>

pljvaldez 05-26-2009 11:17 AM

Do you want to uninstall the programs from the OS or just delete the no longer needed *.deb files?

repo 05-26-2009 11:24 AM

Why don't you continue in the previous thread where you asked howto install the deb files from a directory?
http://www.linuxquestions.org/questi...-files-728513/

Dims 05-26-2009 12:07 PM

I wan't to uninstall packages, not delete file.

So, I need to (1) know package name from file name, (2) run dpkg -r for that name. But I don't want to do this manually, since there are many pf deb files.

Dims 05-26-2009 12:47 PM

Trying to combine grep and sed.

But don't understand, why this command

dpkg --info ofed_1.4_all.deb | grep Package: | sed 's/Package: \(?*\)/(\1)/g'

gives

()ofed

i.e. while brackets are not AROUND of found subpattern?


All times are GMT -5. The time now is 04:13 AM.