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 4th March 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default reinstall all packages installed by pkg_add

I installed many packages by pkg_add and want reinstall them again . I can not option for this
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
  #2   (View Single Post)  
Old 4th March 2015
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default

How about 'pkg_info -m' for all manually installed packages and save to 'file' then 'pkg_add -l' file ?
Reply With Quote
  #3   (View Single Post)  
Old 4th March 2015
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

One way
1) Generate a list of manually installed packages leaving out the dependencies
$ pkg_info -m > pkgs.txt
2) Delete all installed packages
# pkg_delete /var/db/pkg/*
3) You may need to edit your pkgs.txt if there have been interim updates/patches. Here is an example:
Code:
cabextract-1.5p0    extracts files from Microsoft CAB archives
to
Code:
cabextract
If you use the vi editor, "D" (delete from cursor to end of line) works wonderfully for this.
4) Re install the packages from pkgs.txt
Code:
pkg_add -l pkgs.txt

Last edited by shep; 4th March 2015 at 04:23 PM.
Reply With Quote
  #4   (View Single Post)  
Old 4th March 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

No modification of the pkg_info output file is needed if you use the -z option with pkg_add(1).

$ pkg_info -qm will give you a simpler list, and one which is is slightly faster to obtain.
Reply With Quote
  #5   (View Single Post)  
Old 5th March 2015
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default

mfaridi , may I ask you why or what has happened that made you decide to remove all packages and reinstall again ?
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
Why does pkg_add sometimes report "packages is empty" ? sw2wolf OpenBSD Packages and Ports 2 22nd March 2012 12:51 AM
Delete or replace all installed packages shep OpenBSD Packages and Ports 3 24th May 2010 01:31 AM
A plan for a remote install and reinstall of FreeBSD J65nko FreeBSD Installation and Upgrading 4 14th February 2010 02:46 PM
Listing of installed packages cyril OpenBSD Packages and Ports 2 9th June 2009 01:24 AM
System messed up, should I just reinstall? AncientDragonfly FreeBSD Ports and Packages 22 22nd April 2009 04:33 AM


All times are GMT. The time now is 01:48 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