How to remove all the dependencies of a package in Julia

A package provides add-on functionality to a language. Julia comes with a pre-installed package manager to install packages. We can find the registered Julia packages at Julia Package Server.

We can remove all the dependencies of a package in Julia using the method rm() provided by the Pkg module.

Syntax

Pkg.rm("provide module name here")

Parameters

This method takes the package name as a parameter.

 Let's take a look at an example of this.

Code example

In this example, we will remove the package XLSX and its dependencies.

julia
using Pkg
Pkg.rm("XLSX")

Code explanation

We follow the commands below to remove the dependencies of a package.

  1. Enter into Julia's prompt with the command julia.

  2. Use the package Pkg module with the command using Pkg.

  3. Remove the dependencies of the package using the command Pkg.rm().

Output

Terminal 1
Terminal
Loading...

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved