X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <28443671.post@talk.nabble.com> Date: Mon, 3 May 2010 23:47:26 -0700 (PDT) From: =?UTF-8?Q?LiuYan_=E5=88=98=E7=A0=94?= To: cygwin AT cygwin DOT com Subject: Re: How to remove those previously downloaded packges? In-Reply-To: <1272952773.71daf73d1e3548068a889fdb786391d1.hzgmaxwell@sohu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <1272952773 DOT 71daf73d1e3548068a889fdb786391d1 DOT hzgmaxwell AT sohu DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I've write a script when Cygwin 1.7 is in beta phase, please see this mail = on old.nabble.com http://old.nabble.com/Cygwin-setup.exe%3A-Clean-historical-setup-packages-t= s26569064.html Here's the updated version for Cygwin-1.7 and Cygwin-Legacy(1.5): http://old.nabble.com/file/p28443671/cleanOldPackages_UTF8.sh cleanOldPackages_UTF8.sh=20 It simply find setup.ini and setup-legacy.ini in sub-directories (mirror directories) recursively, and strip out the file list from setup.ini/setup-legacy.ini, and then find out local files which are not existed in the file list, then delete it. $ ./cleanOldPackages_UTF8.sh ################################################################## =E6=B8=85=E7=90=86 Cygwin =E6=97=A7=E5=AE=89=E8=A3=85=E5= =8C=85 Clean Old Install Packages of Cygwin by LiuYan 2010-01-25 12:01 ################################################################## Usage =E7=94=A8=E6=B3=95: ./cleanOldPackages_UTF8.sh [-d] [-g][-l] [-p] -d Delete file if it is old =E5=88=A0=E9=99=A4=E6=97=A7=E6=96=87=E4=BB=B6 -g, -l Generate old file deletion script file =E7=94=9F=E6=88=90=E5=88=A0=E9=99=A4=E6=97=A7=E6=96=87=E4=BB=B6= =E7=9A=84=E6=89=A7=E8=A1=8C=E8=84=9A=E6=9C=AC=E6=96=87=E4=BB=B6 -p Treat files listed in [prev] section of setup.ini as old =E5=B0=86 setup.ini =E4=B8=AD [prev] =E9=83=A8=E5=88=86=E6=89=80=E5= =88=97=E5=87=BA=E7=9A=84=E6=96=87=E4=BB=B6=E5=BD=93=E4=BD=9C=E6=97=A7=E6=96= =87=E4=BB=B6 Wish it can help you. hzgmaxwell wrote: >=20 > hi community, >=20 >=20 > Every time when I was installing a cygwin, I run the setup twice. > The first time is to download only, then the second is to install from > local directory. >=20 > To doing like this is to keep the installed packages under a specified > directory, then later on I can re-install from there if only I need to > install cygwin again. >=20 > Now the problem is that the installer -- I mean setup.exe keeps those > previously downloaded packages. For example, under gcc\gcc-core, there are > two files as gcc-core-3.4.4-3.tar.bz2 and gcc-core-3.4.4-999.tar.bz2, > actually as we know, gcc-core-3.4.4-3.tar.bz2 is a previously downloaded > version, I want it to be removed when a new version is downloaded. >=20 > I had thought about writing a script to do the job, but I found it's not > good idea, because it's not easy to find out all the old packages, it's > subject to the naming convention. >=20 > I wonder if the installer could provide a feature to remove those old > packages. Thanks for any hint or if there is already this kind of feature. >=20 >=20 >=20 > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >=20 >=20 >=20 --=20 View this message in context: http://old.nabble.com/How-to-remove-those-pre= viously-downloaded-packges--tp28443377p28443671.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple