clean-old-distfiles.1 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. .\" $OpenBSD: clean-old-distfiles.1,v 1.5 2015/07/23 08:05:18 bentley Exp $
  2. .\"
  3. .\" Copyright (c) 2012 Marc Espie <espie@openbsd.org>
  4. .\"
  5. .\" Permission to use, copy, modify, and distribute this software for any
  6. .\" purpose with or without fee is hereby granted, provided that the above
  7. .\" copyright notice and this permission notice appear in all copies.
  8. .\"
  9. .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. .\"
  17. .Dd $Mdocdate: July 23 2015 $
  18. .Dt CLEAN-OLD-DISTFILES 1
  19. .Os
  20. .Sh NAME
  21. .Nm clean-old-distfiles
  22. .Nd remove old distfiles
  23. .Sh SYNOPSIS
  24. .Nm clean-old-distfiles
  25. .Op Fl nv
  26. .Op Fl e Ar except
  27. .Op Fl h Ar history
  28. .Op Ar timestamp
  29. .Sh DESCRIPTION
  30. .Nm
  31. uses information provided by
  32. .Xr dpb 1
  33. to remove obsolete distfiles:
  34. each time
  35. .Xr dpb 1
  36. is run for a full scan of the ports tree, it appends to
  37. an history log that records obsolete distfiles.
  38. .Pp
  39. .Nm
  40. can be used to prune that log prior to a given
  41. .Ar timestamp
  42. and remove the corresponding distfiles.
  43. .Pp
  44. For normal files,
  45. .Nm
  46. verifies
  47. .Xr sha256 1
  48. checksums prior to removal.
  49. .Nm
  50. also removes links under
  51. .Pa by_cipher/sha256 ,
  52. but it trusts that the checksums for these are accurate.
  53. .Pp
  54. The
  55. .Ar timestamp
  56. optional argument is given in seconds since the epoch,
  57. see
  58. .Xr date 1 .
  59. .Pp
  60. Options are as follows:
  61. .Bl -tag -width nnnn
  62. .It Fl e Ar except
  63. Read exception list from file
  64. .Ar except .
  65. Each line is the name of a file that shouldn't be removed.
  66. .It Fl h Ar history
  67. Read log from history file
  68. .Ar history
  69. instead of the default
  70. .Pa /usr/ports/distfiles/history .
  71. Turns on
  72. .Fl nv ,
  73. as this is a testing option.
  74. .It Fl n
  75. Don't really remove files.
  76. .It Fl v
  77. Display what will be removed, as
  78. .Li rm file
  79. lines.
  80. .El
  81. .Sh FILES
  82. .Bl -tag -width /usr/ports
  83. .It Pa /usr/ports
  84. base of the ports tree, can be overridden with env variable
  85. .Ev PORTSDIR .
  86. .It Pa /usr/ports/distfiles
  87. location of the distfiles repository, can be overridden with env variable
  88. .Ev DISTDIR .
  89. .It Pa /usr/ports/distfiles/history
  90. log of obsolete distfiles.
  91. .El
  92. .Sh SEE ALSO
  93. .Xr dpb 1 ,
  94. .Xr sha256 1 ,
  95. .Xr mirroring-ports 7