From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 3B76B385041E for ; Tue, 30 Mar 2021 18:36:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3B76B385041E Received: by mail-ed1-x532.google.com with SMTP id z1so19384740edb.8 for ; Tue, 30 Mar 2021 11:36:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sZYpOQbEpsrNm2g527wVgoT5PD9tgJemtQIkvyrjcNE=; b=MvdnwPexSleV3qvY+pMrjOFgYPVxiNzRDnoM/ErP0icGblKe0yU5+fBQ9hJ5ptNFF0 qOz1oGsPfMcAJRrK/5kBsk8KyWkW5Y4U15dRM9CEb4GVnxrFvlp3VBp7sMP4wi6kwqId 9eT+imcqlFT+Vc6ojJbFzbs/THlZL/WzQmO6vsMHXFFNGuSQLFwNEvEkEcpKlFx/F7kF DdtNq279wPBUP3fQqKk4EX9iw0i22LzkSxnyW6mW3wDI+B1jzRyXRkytJmX1NnZwy13M MQmDB2foF89TLQC7Lt2TmLnUPubgHpVAthwrTZmJRiIJXQGWr0LChUUJ/6WpZjnen/bU Vgwg== X-Gm-Message-State: AOAM533s8dxxozly18KR9thRJ69Gnjgch3QBJ04mD3SHhsQ5SSIp/UkU O/rN7xH2f74oyDSh6KZgOmh0s9ib4rAnGQ== X-Google-Smtp-Source: ABdhPJwY/awwqi//Ta5OfYqmNpeOWpAK7O89TuNFoZ/kxjffPXuZKLXNTrnA36saIkeTl/adNiQCPQ== X-Received: by 2002:aa7:cb0a:: with SMTP id s10mr34832093edt.36.1617129399367; Tue, 30 Mar 2021 11:36:39 -0700 (PDT) Received: from ?IPv6:2003:cc:9f36:b860:edbe:998c:a5a6:f554? (p200300cc9f36b860edbe998ca5a6f554.dip0.t-ipconnect.de. [2003:cc:9f36:b860:edbe:998c:a5a6:f554]) by smtp.gmail.com with ESMTPSA id k12sm11966686edr.60.2021.03.30.11.36.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Mar 2021 11:36:38 -0700 (PDT) Subject: Re: How to uninstall packages that were installed as dependency but are no longer required To: cygwin@cygwin.com References: <20210330.145159.2203755649720422295.yasu@utahime.org> <4c3c2dc4-6de3-9a3b-b39a-986e651275c3@gmail.com> From: Marco Atzeri Message-ID: <154a6ca4-d485-a99c-9105-25382b5de9d8@gmail.com> Date: Tue, 30 Mar 2021 20:36:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2021 18:36:42 -0000 On 30.03.2021 19:18, Brian Inglis wrote: > On 2021-03-30 02:07, Marco Atzeri via Cygwin wrote: >> On 30.03.2021 07:51, Yasuhiro Kimura wrote: >>> If you repeat the update of installed Cygwin packages for a while, >>> it's quite possible that there are some packages that were installed >>> as dependency but are no longer required by any others. >>> >>> Then is there any way to detect and uninstall such ones? >>> >>> I expect such way as `apt autoremove` of Debian or `dnf autoremove` of >>> Fedora. > >> as currently we are not tracking between choosen packages >> and installed by dependency, Cygwin is lacking such capabilities > > The undocumented third field in installed.db is automatic dependency 0 / > manually picked 1: > > $ sort -k3 /etc/setup/installed.db | uniq -cf2 >          1 INSTALLED.DB 3 >       1203 _autorebase _autorebase-001007-1.tar.bz2 0 >        467 aalib aalib-1.4rc5-12.tar.bz2 1 > it really depends on the history of the package, I have tons of package with "0" that in reality were picked long time ago. So it is not 100% trustable on long time installation