On Thu, Mar 17, 2011 at 10:31:52AM +0200, Sohin Vyacheslav wrote: > День добрый, > > при установке пакетов apt-get install прицепом устанавливает и все > зависящие от устанавливаемого пакета пакеты...
Наоборот - apt-get устанавливает все пакеты, от которых Ваш пакет зависит. > а как можно удалить > пакет со всеми зависящими от него например средствами dpkg? Если и тут наоборот, то dpkg -r pkgname; apt-get autoremove или apt-get remove; apt-get autoremove. Информация о том какие пакеты были установлени автоматически как зависимости других держит apt, а никак не dpkg. Если же действительно хотите удалить пакет и все другие, которые зависят от него (напр. удалить libapr1 и соответствено тоже apache2.2-bin и subversion), то можно парсить dpkg -r --dry-run; что-то вроде атачмента (только-что добавленого к моим shell script snippets, http://gitorious.org/sssnips), можно, подойдет. Всего лучшего, Петр -- Peter Pentchev r...@ringlet.net r...@freebsd.org pe...@packetscale.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 Thit sentence is not self-referential because "thit" is not a word.
recremove.sh
Description: Bourne shell script
.\" Copyright (c) 2011 Peter Pentchev .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd March 17, 2011 .Dt RECREMOVE 1 .Os .Sh NAME .Nm recremove .Nd recursively remove a Debian package and everything that depends on it .Sh SYNOPSIS .Nm .Op Fl v .Ar pkgname... .Nm .Op Fl h .Op Fl v .Sh DESCRIPTION The .Nm utility lists all packages that ought to be removed along with the ones specified on the command line, i.e. everything that depends on the specified packages, everything that depends on the latter, etc. .Pp Options: .Bl -tag -width indent .It Fl h Display program usage information and exit. .It Fl V Display program version information and exit. .It Fl v Verbose operation; display diagnostic messages. .El .Sh RETURN VALUES .Ex -std .Sh ENVIRONMENT The operation of the .Nm utility is currently not affected by environment variables. .Sh FILES The operation of the .Nm utility is currently not affected by any files. .Sh EXAMPLES Show what ought to be removed along with the APR library: .Pp .Dl recremove libapr1 .Pp .Sh SEE ALSO .Xr dpkg 1 .Sh HISTORY The .Nm utility was written by .An Peter Pentchev in 2011. .Sh AUTHORS .An Peter Penchev .Aq r...@ringlet.net .Sh BUGS No, thanks! Still, if you should find any, please report them to the author :) .Sh TODO .Bl -tag -width indent .It * Support other operating systems :) .El
signature.asc
Description: Digital signature