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
Old 7th October 2017
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

What is the output of:
Code:
$ mkdir /tmp/compare
$ cd /tmp/compare/
$ pkg_info -m > manual.txt
$ pkg_info -t > not_required_by_others.txt
$ comm -23 not_required_by_others.txt manual.txt
$ 
$ cd ~
$ rm /tmp/compare/*                                                            
$ rmdir /tmp/compare/
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 7th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Code:
$ cat manual.txt                                                               
apg-2.2.3p0         automated password generator
chromium-61.0.3163.100 Chromium browser
claws-mail-3.15.0p0 mail and news client
dillo-3.0.5p1       fast and light graphical web browser
firefox-56.0        Mozilla web browser
hexchat-2.12.3p0    GTK+2 IRC Client
k3b-2.0.3ap0        CD/DVD creator
libreoffice-5.2.7.2p6v0 multi-platform productivity suite
mpv-0.22.0p0        movie player based on MPlayer/mplayer2
nano-2.8.7          Pico editor clone with enhancements
nmap-7.60p0         scan ports and fingerprint stack of network hosts
quirks-2.367        exceptions to pkg_add rules
smplayer-17.9.0     complete front-end for MPlayer
sylpheed-3.6.0      lightweight and user-friendly e-mail client
thunderbird-52.2.1p3 Mozilla e-mail, rss and usenet client
vlc-2.2.6p0         VideoLAN client; multimedia player
xfce-4.12p6         Xfce desktop meta-package (base installation)
Code:
cat not_required_by_others.txt
apg-2.2.3p0         automated password generator
chromium-61.0.3163.100 Chromium browser
claws-mail-3.15.0p0 mail and news client
dillo-3.0.5p1       fast and light graphical web browser
firefox-56.0        Mozilla web browser
hexchat-2.12.3p0    GTK+2 IRC Client
k3b-2.0.3ap0        CD/DVD creator
libreoffice-5.2.7.2p6v0 multi-platform productivity suite
mpv-0.22.0p0        movie player based on MPlayer/mplayer2
nano-2.8.7          Pico editor clone with enhancements
nmap-7.60p0         scan ports and fingerprint stack of network hosts
quirks-2.367        exceptions to pkg_add rules
smplayer-17.9.0     complete front-end for MPlayer
sylpheed-3.6.0      lightweight and user-friendly e-mail client
thunderbird-52.2.1p3 Mozilla e-mail, rss and usenet client
xfce-4.12p6         Xfce desktop meta-package (base installation)
Code:
$ cat not_required_by_others.txt manual.txt
apg-2.2.3p0         automated password generator
chromium-61.0.3163.100 Chromium browser
claws-mail-3.15.0p0 mail and news client
dillo-3.0.5p1       fast and light graphical web browser
firefox-56.0        Mozilla web browser
hexchat-2.12.3p0    GTK+2 IRC Client
k3b-2.0.3ap0        CD/DVD creator
libreoffice-5.2.7.2p6v0 multi-platform productivity suite
mpv-0.22.0p0        movie player based on MPlayer/mplayer2
nano-2.8.7          Pico editor clone with enhancements
nmap-7.60p0         scan ports and fingerprint stack of network hosts
quirks-2.367        exceptions to pkg_add rules
smplayer-17.9.0     complete front-end for MPlayer
sylpheed-3.6.0      lightweight and user-friendly e-mail client
thunderbird-52.2.1p3 Mozilla e-mail, rss and usenet client
xfce-4.12p6         Xfce desktop meta-package (base installation)
apg-2.2.3p0         automated password generator
chromium-61.0.3163.100 Chromium browser
claws-mail-3.15.0p0 mail and news client
dillo-3.0.5p1       fast and light graphical web browser
firefox-56.0        Mozilla web browser
hexchat-2.12.3p0    GTK+2 IRC Client
k3b-2.0.3ap0        CD/DVD creator
libreoffice-5.2.7.2p6v0 multi-platform productivity suite
mpv-0.22.0p0        movie player based on MPlayer/mplayer2
nano-2.8.7          Pico editor clone with enhancements
nmap-7.60p0         scan ports and fingerprint stack of network hosts
quirks-2.367        exceptions to pkg_add rules
smplayer-17.9.0     complete front-end for MPlayer
sylpheed-3.6.0      lightweight and user-friendly e-mail client
thunderbird-52.2.1p3 Mozilla e-mail, rss and usenet client
vlc-2.2.6p0         VideoLAN client; multimedia player
xfce-4.12p6         Xfce desktop meta-package (base installation)
Reply With Quote
Old 8th October 2017
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 68
Default

Hi bsd007,

I think I have some ideas, but first I want to make sure I understand what you want to do.

It looks like you were trying to install keepassx, then changed your mind and cancelled the installation.

Now, you want to:

1) find out if keepassx was installed (it probably wasn't);
2) if it's present, uninstall it, and;
3) uninstall any leftover keepassx dependencies.

Is that correct?
Reply With Quote
Old 8th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

Quote:
Originally Posted by gustaf View Post
Hi bsd007,

I think I have some ideas, but first I want to make sure I understand what you want to do.

It looks like you were trying to install keepassx, then changed your mind and cancelled the installation.

Now, you want to:

1) find out if keepassx was installed (it probably wasn't);
2) if it's present, uninstall it, and;
3) uninstall any leftover keepassx dependencies.

Is that correct?
Yes that's correct.
Reply With Quote
Old 8th October 2017
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 68
Default

Quote:
Originally Posted by bsd007 View Post
How do I find which packages were installed and how do I remove them ?
First, if you want to remove an installed package and its dependencies, you shouldn't need to know which dependencies were installed.

Dependencies are complicated. There are often dependencies of dependencies that link together to form a complex tree. If you go willy nilly deleting these dependencies by hand, you could seriously mess up your system.

pkg_info(1), pkg_add(1), and pkg_delete(1) were designed to make package management easy and reliable.

Before deleting any packages, the most important piece of information you need is which packages you installed manually.

Quote:
Originally Posted by e1-531g View Post
What is the output of:
Code:
..........................
$ pkg_info -m > manual.txt
..........................

Quote:
Originally Posted by bsd007 View Post
Code:
$ cat manual.txt                                                               
apg-2.2.3p0         automated password generator
chromium-61.0.3163.100 Chromium browser
claws-mail-3.15.0p0 mail and news client
dillo-3.0.5p1       fast and light graphical web browser
firefox-56.0        Mozilla web browser
hexchat-2.12.3p0    GTK+2 IRC Client
k3b-2.0.3ap0        CD/DVD creator
libreoffice-5.2.7.2p6v0 multi-platform productivity suite
mpv-0.22.0p0        movie player based on MPlayer/mplayer2
nano-2.8.7          Pico editor clone with enhancements
nmap-7.60p0         scan ports and fingerprint stack of network hosts
quirks-2.367        exceptions to pkg_add rules
smplayer-17.9.0     complete front-end for MPlayer
sylpheed-3.6.0      lightweight and user-friendly e-mail client
thunderbird-52.2.1p3 Mozilla e-mail, rss and usenet client
vlc-2.2.6p0         VideoLAN client; multimedia player
xfce-4.12p6         Xfce desktop meta-package (base installation)
Based on this output and the results of

Quote:
Originally Posted by bsd007 View Post
Code:
# pkg_delete -a -n
.libs-partial-thunderbird-52.2.1p3: ok
it looks like keepassx is completely gone, but I'm puzzled by '.libs-partial-thunderbird-52.2.1p3' since you have thunderbird-52.2.1p3 installed.

I have never seen a message like this, so I tried a Web search using the terms "pkg_delete" "libs-partial", typed exactly like that, with quotes. The only result was a daemonforums thread on package_check errors from October 2015.

Of particular interest is jggimi's response.

BTW, in case you were not aware, running commands as root (# command) is a really bad practice for security reasons. Don't do it. Learn how to use doas(1) and doas.conf(5) to run commands which require root privileges.
Reply With Quote
Old 8th October 2017
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 68
Default

I see you are running pkg_add -u. When you are finished, can you re-post the output of
$ doas pkg_delete -a -n?

You might also want to run pkg_check(1) to check the consistency of your installed packages. When finished, the output should tell you something about the state of your installed packages. If you get error messages like "can't read file", you will need to use doas(1) to gain the necessary privileges. Type your password at the prompt and the command should begin running:

Code:
$ pkg_check -inv

Packing-list sanity: ok
Direct dependencies: ok
Reverse dependencies: ok
Files from packages: ok
--- dbus-daemon-launch-helper-1.10.22 -------------------
can't read /usr/local/libexec/dbus-daemon-launch-helper
Code:
$ doas pkg_check -inv
doas (gustaf@thinkpadX220t.local) password:

Packing-list sanity: ok
Direct dependencies: ok
Reverse dependencies: ok
Files from packages: ok

Last edited by gustaf; 8th October 2017 at 09:31 PM. Reason: typo
Reply With Quote
Old 8th October 2017
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

@bsd007
I had used comm(1) command, not cat. Exact path is /usr/bin/comm.
Anyway I had created files based on your output and run comm command on those and I don't see any output.
For me it means that you don't have any packages installed as dependency, but no longer needed as dependency.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase

Last edited by e1-531g; 8th October 2017 at 08:01 AM. Reason: output, not input
Reply With Quote
Old 8th October 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

I keep a whitelist of packages that I know I want [1] and then use this to "clean" my system of any dross after I've finished testing:
Code:
# pkg_delete -X $(cat pkg.list)
This removes everything not in pkg.list

[1] Get the system exactly how you want it and then use:
Code:
pkg_info -q > pkg.list
__________________
Are you infected with Wetiko?
Reply With Quote
Old 8th October 2017
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 68
Default

In the future, if you accidentally start a package installation, then change your mind, the safest course of action is to let the installation finish, then delete the package and its dependencies. That way, you eliminate the possibility of a partially installed package.

To delete a single package: $ doas pkg_delete -civ [package-name]

For example, $ pkg_delete -civ keepassx will delete the package keepassx and any extra configuration files mentioned in the packing list, possibly ask some questions to make sure the correct package is being deleted, and print basic messages.

After you delete the package, you can run $ pkg_delete -aciv to remove any unused dependencies.

In my experience, these commands won't touch anything in your home directory, so you will need to manually remove any files that the package installed into your home directory. Be extremely careful when you do this. Before you remove any files from your home directory, make absolutely certain that they are not needed by anything installed on your system!

A good (and safe) way to learn about OpenBSD is by experimenting with commands that display information. They won't do anything to your system. They will just tell you what's on it and give you some idea of how it works. pkg_info(1) is one such command.
Reply With Quote
Old 9th October 2017
bsd007's Avatar
bsd007 bsd007 is offline
Always learning
 
Join Date: Sep 2014
Posts: 242
Default

All commands noted for future use. Thanks a lot.
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 06:01 AM.


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