LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 11:12 AM   #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, 11:16 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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

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

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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, 12: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, 12: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



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 06:08 PM
how to uninstall an .deb file jilloper Debian 6 08-25-2007 05:38 PM
.deb files on RH MKSN Linux - Newbie 6 07-18-2006 07:47 AM
how to use .deb files???? E.M.P99 Linux - Newbie 4 04-11-2006 02:41 PM
/proc diectory tushar123 Linux - Newbie 2 07-30-2004 05:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:55 AM.

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
Open Source Consulting | Domain Registration