1*c959cce9Sespie.\" $OpenBSD: pkg_delete.1,v 1.59 2018/07/10 10:20:51 espie Exp $ 2a9987ed9Sespie.\" 31144937fSespie.\" Documentation and design originally from FreeBSD. All the code has 41144937fSespie.\" been rewritten since. We keep the documentation's notice: 5a9987ed9Sespie.\" 6a9987ed9Sespie.\" Redistribution and use in source and binary forms, with or without 7a9987ed9Sespie.\" modification, are permitted provided that the following conditions 8a9987ed9Sespie.\" are met: 9a9987ed9Sespie.\" 1. Redistributions of source code must retain the above copyright 10a9987ed9Sespie.\" notice, this list of conditions and the following disclaimer. 11a9987ed9Sespie.\" 2. Redistributions in binary form must reproduce the above copyright 12a9987ed9Sespie.\" notice, this list of conditions and the following disclaimer in the 13a9987ed9Sespie.\" documentation and/or other materials provided with the distribution. 14a9987ed9Sespie.\" 15a9987ed9Sespie.\" Jordan K. Hubbard 16a9987ed9Sespie.\" 17a9987ed9Sespie.\" 18*c959cce9Sespie.Dd $Mdocdate: July 10 2018 $ 19a9987ed9Sespie.Dt PKG_DELETE 1 20a9987ed9Sespie.Os 21a9987ed9Sespie.Sh NAME 22a9987ed9Sespie.Nm pkg_delete 2360408f26Sjmc.Nd delete software package distributions 24a9987ed9Sespie.Sh SYNOPSIS 25a9987ed9Sespie.Nm pkg_delete 26e57394d3Sespie.Op Fl acIimnqsVvXx 27c7b0d798Sespie.Op Fl B Ar pkg-destdir 28e307f1a1Sschwarze.Op Fl D Ar name Ns Op = Ns Ar value 29fd86ef36Sjmc.Op Ar pkg-name ... 30a9987ed9Sespie.Sh DESCRIPTION 31a9987ed9SespieThe 32a9987ed9Sespie.Nm 33a9987ed9Sespiecommand is used to delete packages that have been previously installed 34a9987ed9Sespiewith the 35a9987ed9Sespie.Xr pkg_add 1 36a9987ed9Sespiecommand. 37a9987ed9Sespie.Pp 38acb899f4SespiePackage names may be specified either as the package name itself, or as a 39acb899f4Sespiefilename which consists of the package name plus the 40a9987ed9Sespie.Dq .tgz 41acb899f4Sespiesuffix, or as a full pathname like 42acb899f4Sespie.Pa /var/db/pkg/pkgname , 43acb899f4Sespieso that shell wildcards can be used. 44acb899f4Sespie.Pp 45acb899f4SespieVersion numbers and flavors 46acb899f4Sespie.Po 47acb899f4Sespiesee 48acb899f4Sespie.Xr packages-specs 7 49acb899f4Sespie.Pc 50acb899f4Sespiecan be omitted, unless the resulting specification is ambiguous. 51a9987ed9Sespie.Pp 52887b8251SespieOtherwise, 53887b8251Sespie.Ar pkg-name 54887b8251Sespiein 55887b8251Sespie.Nm 56887b8251Sespiemay use the same convenient shortcuts as 57887b8251Sespie.Xr pkg_add 1 : 58887b8251Sespie.Sq Nm Ar autoconf Ns % Ns Ar 2.13 59887b8251Sespiewill delete 60887b8251Sespie.Ar autoconf 61887b8251Sespiefrom the 62887b8251Sespie.Ar 2.13 63887b8251Sespiebranch. 64887b8251Sespie.Pp 65de512720Sespie.Nm 66de512720Sespiewill 67de512720Sespie.Xr syslog 3 680e7957f8Srpedeletions by default. 69de512720Sespie.Pp 70f4cb3c7fSespie.Nm 7123fef8b1Sespierelies on the file system information being consistent. 7223fef8b1SespieIn case of a system crash, 7323fef8b1Sespie.Pa /var/db/pkg 7423fef8b1Sespiemay become corrupted. 7523fef8b1SespieUse 7623fef8b1Sespie.Xr pkg_check 8 7723fef8b1Sespieto repair things. 7823fef8b1Sespie.Pp 7923fef8b1Sespie.Nm 80f4cb3c7fSespiemay ask questions in interactive mode, or error out otherwise. 81f4cb3c7fSespieInteractive mode is the default on a tty, see 82f4cb3c7fSespieoptions 83f4cb3c7fSespie.Fl I/i . 84f4cb3c7fSespie.Pp 85a9987ed9SespieThe options are as follows: 86e307f1a1Sschwarze.Bl -tag -width Ds 87cbc75a7aSespie.It Fl a 88cbc75a7aSespieDelete unused dependencies (packages that are not needed by anything tagged 89cbc75a7aSespieas installed manually). 90fef35309SespieCan be used without 91fef35309Sespie.Ar pkgnames . 92c0819799SespieIf used with 93c0819799Sespie.Ar pkgnames , 94c0819799Sespieit will only delete non manual installs in the list. 95c7b0d798Sespie.It Fl B Ar pkg-destdir 96c7b0d798SespieSet 97c7b0d798Sespie.Ar pkg-destdir 98c7b0d798Sespieas the prefix to prepend to any object deleted. 9997a4f029Sjmc.It Fl c 10097a4f029SjmcDelete extra configuration file, mentioned as 10197a4f029Sjmc.Dl @extra file 10297a4f029Sjmcin the packing-list. 103e307f1a1Sschwarze.It Fl D Ar name Ns Op = Ns Ar value 104acb899f4SespieForce removal of the package. 1057e222564Sespie.Ar name 1067e222564Sespieis a keyword that states what failsafe 107acb899f4Sespieshould be waived. 1087e222564SespieRecognized keywords include: 1097ee0afc1Sjmc.Pp 1107ee0afc1Sjmc.Bl -tag -width "dependenciesXX" -compact 111bd3a5667Sbentley.It Cm baddepend 1127ee0afc1SjmcForce the deletion of packages even if they reference nonexistent dependencies. 113bd3a5667Sbentley.It Cm checksum 114bef549c8SespieVerify checksums before deleting files. 115bd3a5667Sbentley.It Cm dependencies 1167ee0afc1SjmcAlso delete the whole set of packages that depends upon the requested packages. 117bd3a5667Sbentley.It Cm nonroot 1187ee0afc1SjmcUninstall even if not running as root. 119bd3a5667Sbentley.It Cm scripts 1207ee0afc1SjmcExternal scripts may fail. 121dfae7728Sespie.El 12256f05edeSespie.It Fl I 12356f05edeSespieForce non-interactive mode. 12456f05edeSespieDefault is to be interactive when run from a tty. 1259b5ce663Sespie.It Fl i 12656f05edeSespieForce interactive mode, even if not run from a tty. 1279b5ce663Sespie.Nm 1289b5ce663Sespiemay ask questions to the user if faced with difficult decisions. 12969dc3962Sespie.It Fl m 13069dc3962SespieCauses 13169dc3962Sespie.Nm 13269dc3962Sespieto always display the progress meter in cases it would not do so by default. 13397a4f029Sjmc.It Fl n 13497a4f029SjmcDon't actually deinstall a package, just report the steps that 13597a4f029Sjmcwould be taken if it were. 136bef549c8Sespie.It Fl qq 137bef549c8SespieDo not bother with checksums for configuration files. 138abbdbb27Sespie.It Fl s 139abbdbb27SespieDon't actually deinstall packages, report the disk size changes 140abbdbb27Sespiethat would happen. 141e57394d3Sespie.It Fl V 142e57394d3SespieTurn on statistics output. 143e57394d3SespieFor now, only displays the number of packages done/total number of packages. 144e57394d3SespieSeveral 145e57394d3Sespie.Fl V 146e57394d3Sespiewill turn on more statistics in the future. 1477b2d8b10Sespie.It Fl v 1487b2d8b10SespieTurn on verbose output. 1497b2d8b10SespieSeveral 1507b2d8b10Sespie.Fl v 1517b2d8b10Sespieturn on more verbose output. 152abbdbb27SespieBy default, 153abbdbb27Sespie.Nm 154abbdbb27Sespieis almost completely silent, but it reacts to keyboard status requests 155abbdbb27Sespie.Po 156abbdbb27Sespiesee 157abbdbb27Sespie.Xr stty 1 158abbdbb27Sespie.Pc . 159abbdbb27Sespie.Fl v 160abbdbb27Sespieturns on basic messages, 161abbdbb27Sespie.Fl vv 162abbdbb27Sespieadds relevant system operations, 163abbdbb27Sespie.Fl vvv 164abbdbb27Sespieshows most internal computations apart from individual file/directory 165abbdbb27Sespieadditions, and 166abbdbb27Sespie.Fl vvvvv 167abbdbb27Sespieshows everything. 168bd849d19Sespie.It Fl X 169bd849d19SespieDelete everything, except the list of packages that follow. 1707b2d8b10Sespie.It Fl x 17155c7b459SjmcDisable progress meter. 172a9987ed9Sespie.El 173a9987ed9Sespie.Sh TECHNICAL DETAILS 174a9987ed9Sespie.Nm 175acb899f4Sespieexamines installed package records for the 176acb899f4Sespie.Ar pkgname 177acb899f4Sespiespecified, checks inter-dependencies between installed packages, 178acb899f4Sespiedeletes the package contents in an order respecting dependencies 179acb899f4Sespie(e.g., packages with dependencies get removed first), and finally 180acb899f4Sespieremoves the package records. 181a9987ed9Sespie.Pp 182acb899f4SespieIf a package is required by other installed packages not mentioned in 183acb899f4Sespiethe list of packages to remove, 184a9987ed9Sespie.Nm 185acb899f4Sespiewill list those dependent packages and refuse to delete the package. 186c7b0d798Sespie.Sh ENVIRONMENT 187bef549c8Sespie.Bl -tag -width PKG_CHECKSUM 188bef549c8Sespie.It Ev PKG_CHECKSUM 189bef549c8SespieIf set, verify files checksums during deletion, exactly like 190bd3a5667Sbentley.Fl D Ns Cm checksum . 191c7b0d798Sespie.It Ev PKG_DBDIR 192c7b0d798SespieWhere to look for installed packages instead of 193c7b0d798Sespie.Pa /var/db/pkg . 194c7b0d798Sespie.El 195a9987ed9Sespie.Sh SEE ALSO 196a9987ed9Sespie.Xr pkg_add 1 , 197a9987ed9Sespie.Xr pkg_create 1 , 198a9987ed9Sespie.Xr pkg_info 1 , 19923fef8b1Sespie.Xr packages-specs 7 , 20023fef8b1Sespie.Xr pkg_check 8 201a9987ed9Sespie.Sh AUTHORS 202a9987ed9Sespie.Bl -tag -width indent -compact 20327e95970Sschwarze.It An Jordan Hubbard 204a9987ed9Sespieinitial design 20527e95970Sschwarze.It An Marc Espie 206a9987ed9Sespiecomplete rewrite 207a9987ed9Sespie.El 208