DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd May 2010
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default Delete or replace all installed packages

I think the mirror I used for a new 4.7 install was incomplete as I had several errors (some packages not found that I manually installed)
I must of missed something as my xfce4 desktop is missing components.

I would like to delete all packages and try again with a second level mirrror.
I applied all 5 patches to the core and was wondering if there is either a way to force replacement of all packages or to delete all installed packages?

FreeBSD has a pke_delete -a but OpenBSD does not. Is there a script that would do this?

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 22nd May 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by shep View Post
Is there a script that would do this?
It is fairly straightforward to pass the output of pkg_info(1) to pkg_delete(1):
Code:
#/bin/sh

for f in $(pkg_info | awk '{ print $1 }') ; do
    echo "pkg_delete -F $f"
done
This code is merely illustrative, but it should give you enough information to complete bulk deletion yourself.
Reply With Quote
  #3   (View Single Post)  
Old 22nd May 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

The package tools are pretty smart as well, you can do something like pkg_delete /var/db/pkg/* and it should work.
Reply With Quote
  #4   (View Single Post)  
Old 24th May 2010
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Thanks for both replies. I'm a lazy typist and tried BSDfan666 solution which worked.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing of installed packages cyril OpenBSD Packages and Ports 2 9th June 2009 01:24 AM
Need a lightweight browser to replace Fx3 TerryP General software and network 15 12th February 2009 10:45 PM
sh replace string graudeejs Programming 2 24th July 2008 06:37 PM
Cannot delete it.... graudeejs FreeBSD General 9 20th July 2008 12:45 PM
proxy : replace gif with local gif milo974 OpenBSD General 4 17th July 2008 06:45 AM


All times are GMT. The time now is 07:36 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick