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 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default How to remove unwanted packages ?

Hi,

I was installing keepassx but decided to abort the installation midway so I did ctrl+c which ended the process but by then some packages were already unpacked/installed.

How do I find which packages were installed and how do I remove them ?
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
  #2   (View Single Post)  
Old 7th October 2017
ibara's Avatar
ibara ibara is offline
WR Slowest SNOBOL4 laptop
 
Join Date: Jan 2014
Posts: 522
Default

pkg_info(1)
Reply With Quote
  #3   (View Single Post)  
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Quote:
Originally Posted by ibara View Post

Quote:
This option allows you to test for the presence of another (perhaps prerequisite) package from a script. If the package identified by pkg-name is currently installed, return 0, otherwise return 1. In addition, the names of any package(s) found installed are printed to stdout unless turned off using the -q option.
The given pkg-name is actually a package specification, as described in packages-specs(7). For example, pkg_info -e 'name->=1.3' will match versions 1.3 and later of the name package.

I am getting this

Code:
# pkg_check -e keepassx-2.0.3p1.tgz        
pkg_check: Unknown option -e
Usage: pkg_check [-FfIimnqvx] [-B pkg-destdir] [-D value]
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
  #4   (View Single Post)  
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

Quote:
I am getting this
Code:
# pkg_check -e keepassx-2.0.3p1.tgz
You are not typing the command as shown ,
Quote:
The given pkg-name is actually a package specification, as described in packages-specs(7). For example, pkg_info -e 'name->=1.3'
Code:
pkg_info -e 'name->=1.3'
Here is another example:
Code:
$ pkg_info -e 'xpaint->=1.2'
inst:xpaint-2.7.8.1p5
Or in your case:
Code:
$ pkg_info -e 'keepassx->=2.0'

$
For me, it show nothing, but I don't have that package installed.
__________________
My best friends are parrots

Last edited by GarryR; 7th October 2017 at 05:12 PM.
Reply With Quote
  #5   (View Single Post)  
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Quote:
Originally Posted by GarryR View Post
Code:
# pkg_check -e keepassx-2.0.3p1.tgz
You are not typing the command as shown ,

Code:
pkg_info -e 'name->=1.3'
Here is another example:
Code:
$ pkg_info -e 'xpaint->=1.2'
inst:xpaint-2.7.8.1p5
I did

Code:
$ pkg_info -e 'keepassx->=2.0.3'   
$
The command just ended without any output.
Does that mean keepassx or any if its dependencies were not insalled ?
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics

Last edited by bsd007; 7th October 2017 at 05:32 PM.
Reply With Quote
  #6   (View Single Post)  
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

Well, it does mean "keepassx" is not installed, I think, but
you still are not typing it as shown:
Code:
$ pkg_info -e 'keepassx->=2.0'
You show
Code:
$ pkg_info -e 'keepassx=-2.0.3'    
$
Code:
man pkg_info
Quote:
-e pkg-name
This option allows you to test for the presence of another
(perhaps prerequisite) package from a script. If the package
identified by pkg-name is currently installed, return 0,
otherwise return 1. In addition, the names of any package(s)
found installed are printed to stdout unless turned off using the
-q option.

The given pkg-name is actually a package specification, as
described in packages-specs(7). For example, pkg_info -e
'name->=1.3' will match versions 1.3 and later of the name
package.
I am not sure on the dependencies, I think you would need to know what
the dependencies packages names are,...
__________________
My best friends are parrots
Reply With Quote
  #7   (View Single Post)  
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Just corrected the error. Sorry about that. I don't remember the name of the deps.

So I guess there is no way to find out.

Thanks to both for your replies.
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
  #8   (View Single Post)  
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

The -f option ,
Code:
man pkg_info
Will show the dependencies and packing information:
Quote:
-f Show the packing-list instructions for each package. See
pkg_create(1) and package(5) for the various annotations.
__________________
My best friends are parrots
Reply With Quote
  #9   (View Single Post)  
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

Quote:
bsd007>>So I guess there is no way to find out.
There is ways to get that information, but I am far from any expert, in fact I am having to look at the manual, and also do searches,
to try to help, any way:
How can I see what other packages are dependencies on OpenBsd

And this is where I see about the -f option on pkg_info :
https://unix.stackexchange.com/quest...-under-openbsd

There also is this thread here:
http://daemonforums.org/showthread.php?t=1576
Quote:
1) Find the proper name of the package for the application you want to see dependencies for (we'll use snort.)
Code:
 # pkg_info -Q snort
p5-Net-Snort-Parser-1.21p0
snort-2.8.0.1
snort-2.8.0.1-mysql
snort-2.8.0.1-postgresql
snort-2.8.0.1-prelude
Examples:
Code:
pkg_info -Q keepassx 
keepassx-2.0.3
On mine, it shows nothing, but again I do not have 'keeppassx' installed,...using
xpaint as a exampple:
Code:
$ pkg_info -Q xpaint   
tuxpaint-0.9.22 (installed)
tuxpaint-config-0.0.13p0 (installed)
tuxpaint-stamps-20140823p0
xpaint-2.7.8.1p5 (installed)
===================
Code:
 pkg_info -S keepassx 
Information for http://ftp.openbsd.org/pub/OpenBSD/6.1/packages/i386/keepassx-2.0.3.tgz

Signature: keepassx-2.0.3,@desktop-file-utils-0.23,@gtk-update-icon-cache-3.22.11,@libgcrypt-1.7.6,@qt4-4.8.7p11,@shared-mime-info-1.8,QtGui.10.1,X11.16.1,Xi.12.1,Xtst.11.0,c.89.3,gcrypt.19.3,lib/qt4/QtCore.9.0,m.10.0,stdc++.57.0,z.5.0
============ edite ==========
note: based on this:
Quote:
I was installing keepassx but decided to abort the installation midway so I did ctrl+c which ended the process but by then some packages were already unpacked/installed.
And what you are getting, with empty results, I am pretty sure you don't have anything else installed related
to that package.
__________________
My best friends are parrots

Last edited by GarryR; 7th October 2017 at 06:09 PM.
Reply With Quote
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Code:
$ pkg_info -f 'keepassx->=2.0.3' | grep '^@depend' | cut -f 3 -d :
desktop-file-utils-0.23
shared-mime-info-1.9
libgcrypt-1.8.1
gtk-update-icon-cache-3.22.21p0
qt4-4.8.7p13
^^ That lists the deps but dont say if they are installed.

But

Code:
$ pkg_info -Q keepassx 
keepassx-2.0.3p1
keepassxc-2.2.0-yubikeyp1
keepassxc-2.2.0p1
This command in my case prints the three packages but I can't find keepassx in the menu

or in the terminal. When I type keepass and tab it doesn't autocomplete.
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
Old 7th October 2017
TronDD TronDD is offline
Package Pilot
 
Join Date: Sep 2014
Posts: 155
Default

I think in this case, your easiest option will be pkg_delete(1).

The installed dependecies will be listed as unused since keepass never got installed.
Reply With Quote
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

After running 'pkg_delete'
Code:
pkg_delete keepassx
Try the :
Code:
 pkg_info -Q keepassx
again. If it still shows the 3 files/packages,
Code:
keepassx-2.0.3p1
keepassxc-2.2.0-yubikeyp1
keepassxc-2.2.0p1
delete each one using pkg_delete.
Keep in mind to run 'pkg_delete" it must be done as root.

=============
You DO NOT want to delete those other dependencies listed:
Code:
$ pkg_info -f 'keepassx->=2.0.3' | grep '^@depend' | cut -f 3 -d :
desktop-file-utils-0.23
shared-mime-info-1.9
libgcrypt-1.8.1
gtk-update-icon-cache-3.22.21p0
qt4-4.8.7p13
All though keeppassx depends on them as well, there probably are other packages/programs that
also depend on those.
Quote:
bsd007>>----snip---but I can't find keepassx in the menu

or in the terminal. When I type keepass and tab it doesn't autocomplete.
Since you aborted the installation, and it never completely installed , it would not be able to run,
and would not be in any menu, but also many packages/programs do not just automatically show in
any menus, they sometimes need to be added to the menu manually.
__________________
My best friends are parrots

Last edited by GarryR; 7th October 2017 at 06:31 PM.
Reply With Quote
Old 7th October 2017
TronDD TronDD is offline
Package Pilot
 
Join Date: Sep 2014
Posts: 155
Default

No, that's not the way to use pkg_delete in this case.

You're not trying to delete keepassx, it's not installed. You don't have to care what the dependencies of keepassx are, pkg_delete can find unused dependencies.
Reply With Quote
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Code:
# pkg_delete keepassx
Can't find keepassx
Problem finding keepassx
Code:
# pkg_info -Q keepassx 
keepassx-2.0.3p1
keepassxc-2.2.0-yubikeyp1
keepassxc-2.2.0p1
Code:
# pkg_delete keepassx-2.0.3p1                                                  
Problem finding keepassx-2.0.3p1

# pkg_delete keepassxc-2.2.0-yubikeyp1
Problem finding keepassxc-2.2.0-yubikeyp1

# pkg_delete keepassxc-2.2.0p1         
Problem finding keepassxc-2.2.0p1
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Quote:
Originally Posted by TronDD View Post
No, that's not the way to use pkg_delete in this case.

You're not trying to delete keepassx, it's not installed. You don't have to care what the dependencies of keepassx are, pkg_delete can find unused dependencies.
Then should I use

Code:
pkg_delete -a
?

Is there a way to do a simulation first before actually removing ?
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

Quote:
Originally Posted by TronDD View Post
No, that's not the way to use pkg_delete in this case.

You're not trying to delete keepassx, it's not installed. You don't have to care what the dependencies of keepassx are, pkg_delete can find unused dependencies.
Oops, I apologize, like I said, I am far from being a expert on this.
Quote:
Is there a way to do a simulation first before actually removing ?
Yes, there is :

Code:
man pkg_delete
Quote:
-a Delete unused dependencies (packages that are not needed by
anything tagged as installed manually). Can be used without
pkgnames. If used with pkgnames, it will only delete non manual
installs in the list.
====================
Quote:
-n Don't actually deinstall a package, just report the steps that
would be taken if it were.



-s Don't actually deinstall packages, report the disk size changes
that would happen.
__________________
My best friends are parrots
Reply With Quote
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

This is what I got

Code:
# pkg_delete -a -n                                                             
.libs-partial-thunderbird-52.2.1p3: ok
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
Reply With Quote
Old 7th October 2017
TronDD TronDD is offline
Package Pilot
 
Join Date: Sep 2014
Posts: 155
Default

Yes. There we go.

So when you aborted the install of keepass, had anything actually gotten installed? It would seem not.

Yuo should be able to delete the thunderbird libs, though.
Reply With Quote
Old 7th October 2017
GarryR's Avatar
GarryR GarryR is offline
Real Name: Garry Ricketson
Package Pilot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 202
Default

I don't know what to say on that, you probably should wait and see what someone else says.
Reply With Quote
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 127
Default

Got it. Thanks again.
__________________
OpenBSD 6.2
Intel(R) Core(TM) i3-6100 CPU
Ram 4GB
Intel HD Graphics
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
How to remove a word and everything after? bigb89 Programming 7 31st August 2014 01:47 AM
How to remove these messages ? sw2wolf FreeBSD General 4 11th July 2012 05:04 AM
unwanted printing - cracking? lumiwa FreeBSD Security 9 10th July 2012 01:28 PM
How to remove Gnome and X Malakim Solaris 2 12th April 2009 12:10 PM


All times are GMT. The time now is 03:14 AM.


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