Install Wakaru on Ubuntu 26.04

Install Wakaru on Ubuntu 26.04

Wakaru is a JavaScript decompiler that converts bundled or compiled code into more readable modern JavaScript. It can reverse common transformations produced by bundlers, compilers, and minifiers. This tutorial demonstrates how to install Wakaru on Ubuntu 26.04.

Install Wakaru

The latest Wakaru release can be downloaded directly from GitHub. The following command extracts executable into the /usr/local/bin:

curl -sSL https://github.com/pionxzh/wakaru/releases/latest/download/wakaru-linux-x64.tar.gz \
  | sudo tar xz -C /usr/local/bin wakaru

After installing the binary, verify the Wakaru version to ensure it is available from the command line:

wakaru --version

Testing Wakaru

A small JavaScript file can be used to verify that Wakaru correctly transforms compiled-style code:

nano compiled.js

Insert the following content:

var double = [1, 2, 3].map(function (num) {
  return num * 2;
});

Run Wakaru to transform the code:

wakaru --formatter compiled.js -o decompiled.js

The resulting decompiled.js file should contain a cleaner version of the code:

const double = [1, 2, 3].map((num) => num * 2);

The transformation replaces the older var declaration and traditional anonymous function syntax with modern JavaScript constructs.

Uninstall Wakaru

When Wakaru is no longer needed, remove its executable from the system path:

sudo rm -rf /usr/local/bin/wakaru

Leave a Comment

Cancel reply

Your email address will not be published.