LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2009, 12:12 PM   #1
Dims
Member
 
Registered: Feb 2009
Posts: 151

Rep: Reputation: 15
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.
 
Old 05-26-2009, 12:16 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
why do you want to uninstall them?
dpkg -r <package name>
 
Old 05-26-2009, 12:17 PM   #3
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Do you want to uninstall the programs from the OS or just delete the no longer needed *.deb files?
 
Old 05-26-2009, 12:24 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
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/
 
Old 05-26-2009, 01:07 PM   #5
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
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.
 
Old 05-26-2009, 01:47 PM   #6
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change working diectory thru perl script kzr_merchant Programming 3 05-21-2008 07:08 PM
how to uninstall an .deb file jilloper Debian 6 08-25-2007 06:38 PM
.deb files on RH MKSN Linux - Newbie 6 07-18-2006 08:47 AM
how to use .deb files???? E.M.P99 Linux - Newbie 4 04-11-2006 03:41 PM
/proc diectory tushar123 Linux - Newbie 2 07-30-2004 06:34 AM


All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration