All Projects → giordano → PkgCleanup.jl

giordano / PkgCleanup.jl

Licence: MIT license
Cleanup unused Julia environments and artifacts

Programming Languages

julia
2034 projects

Labels

Projects that are alternatives of or similar to PkgCleanup.jl

DownloadFullInstaller
macOS application written in SwiftUI that downloads installer pkgs for the Install macOS Big Sur application.
Stars: ✭ 678 (+1179.25%)
Mutual labels:  pkg
pkgcheck
Script to check installer pkgs for deprecated runtime calls
Stars: ✭ 88 (+66.04%)
Mutual labels:  pkg
sync-pkg
Minimalist CLI to sync only basic properties from package.json to bower.json
Stars: ✭ 15 (-71.7%)
Mutual labels:  pkg
Electron Builder
A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
Stars: ✭ 11,653 (+21886.79%)
Mutual labels:  pkg
GNU-bash-mac-installer
Downloads and builds a Mac package installer for GNU bash 5
Stars: ✭ 17 (-67.92%)
Mutual labels:  pkg
ps4-remote-pkg-installer
PS4 Remote PKG Installer GUI for https://github.com/flatz/ps4_remote_pkg_installer
Stars: ✭ 107 (+101.89%)
Mutual labels:  pkg
LibOrbisPkg
Library, GUI, CLI for creating, inspecting, and modifying PS4 PKG, SFO, PFS, and related filetypes
Stars: ✭ 131 (+147.17%)
Mutual labels:  pkg
Installomator
Installation script to deploy standard software on Macs
Stars: ✭ 472 (+790.57%)
Mutual labels:  pkg
Wallpaper-Engine-Pkg-to-Zip
Simple program to convert the wallpaper engine pkg files to zip and back!
Stars: ✭ 57 (+7.55%)
Mutual labels:  pkg
octopkg
A Qt-based pkgng (BSD) front end
Stars: ✭ 33 (-37.74%)
Mutual labels:  pkg
gitkraken
Arch User Repository Gitkraken
Stars: ✭ 113 (+113.21%)
Mutual labels:  pkg
OMJulia.jl
Julia scripting OpenModelica interface
Stars: ✭ 31 (-41.51%)
Mutual labels:  pkg
dockerpkg-example
Example app running in small docker container using dockerpkg
Stars: ✭ 54 (+1.89%)
Mutual labels:  pkg
rcpp progress
RcppProgress R package: An interruptible progress bar with OpenMP support for c++ in R packages
Stars: ✭ 26 (-50.94%)
Mutual labels:  pkg

PkgCleanup

Build Status

The Pkg.gc() command garbage collects packages and artifacts that are no longer reachable, but will not touch existing packages or artifacts requested by existing active environments, which are listed in your ~/.julia/logs directory. One option for a more deep cleaning is to run ]gc --all, but this will remove... well... all packages.

If you prefer a more controlled way to clean package installations in your Julia depot, you can remove the undesired manifests lingering in ~/.julia/logs. PkgCleanup.jl provides a couple of functions which let you interactively remove active environments or artifacts you do not care about any longer but cannot be removed by Pkg.gc().

Installation

To install the package, enter the Julia Pkg REPL mode with ] and run the command

add https://github.com/giordano/PkgCleanup.jl

Usage

To load the package, run in the Julia REPL the command

using PkgCleanup

PkgCleanup.jl provides the following interactive functions:

  • PkgCleanup.artifacts(): to remove unneeded Artifacts.toml from your ~/.julia/logs/artifact_usage.toml;
  • PkgCleanup.manifests(): to remove unneeded Manifest.toml from your ~/.julia/logs/manifest_usage.toml.

Yes, that's it.

Demo

NOTE: deselect the entries you want to remove.

julia> using PkgCleanup

julia> PkgCleanup.manifests()
Select the Manifest.toml to keep in /home/user/.julia/logs/manifest_usage.toml
[press: d=done, a=all, n=none]
^  [X] /home/user/.julia/dev/BinaryBuilder/benchmark/Manifest.toml
   [X] /home/user/.julia/dev/JLLWrappers/Manifest.toml
   [X] /home/user/.julia/dev/PhysicalConstants/Manifest.toml
   [X] /home/user/.julia/dev/PkgCleanup/Manifest.toml
   [ ] /home/user/.julia/environments/v1.0/Manifest.toml
   [ ] /home/user/.julia/environments/v1.3/Manifest.toml
   [ ] /home/user/.julia/environments/v1.4/Manifest.toml
 > [ ] /home/user/.julia/environments/v1.5/Manifest.toml
   [X] /home/user/.julia/environments/v1.6/Manifest.toml
v  [X] /home/user/.julia/environments/v1.7/Manifest.toml

You are going to remove the following entries in /home/user/.julia/logs/manifest_usage.toml:
  * /home/user/.julia/environments/v1.0/Manifest.toml
  * /home/user/.julia/environments/v1.3/Manifest.toml
  * /home/user/.julia/environments/v1.4/Manifest.toml
  * /home/user/.julia/environments/v1.5/Manifest.toml
Do you confirm your choice? [Y/n]: y

To actually cleanup packages/artifacts installations, remember to run

    using Pkg
    Pkg.gc()

or, for a more in-depth cleaning,

    using Pkg
    using Dates
    Pkg.gc(; collect_delay=Dates.Day(0))

License

The PkgCleanup.jl package is licensed under the MIT "Expat" License. The original author is Mosè Giordano.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].