How to Install and Uninstall clang-format Package on Ubuntu 21.04 (Hirsute Hippo)

Last updated: May 01,2024

1. Install "clang-format" package

In this section, we are going to explain the necessary steps to install clang-format on Ubuntu 21.04 (Hirsute Hippo)

$ sudo apt update $ sudo apt install clang-format

2. Uninstall "clang-format" package

In this section, we are going to explain the necessary steps to uninstall clang-format on Ubuntu 21.04 (Hirsute Hippo):

$ sudo apt remove clang-format $ sudo apt autoclean && sudo apt autoremove

3. Information about the clang-format package on Ubuntu 21.04 (Hirsute Hippo)

Package: clang-format
Architecture: amd64
Version: 1:12.0-52~exp1
Priority: optional
Section: universe/devel
Source: llvm-defaults (0.52~exp1)
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: LLVM Packaging Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 30
Depends: clang-format-12 (>= 12~)
Breaks: clang (<< 1:3.6-28)
Replaces: clang (<< 1:3.6-28)
Filename: pool/universe/l/llvm-defaults/clang-format_12.0-52~exp1_amd64.deb
Size: 3432
MD5sum: 59f05ca00ffda45208430e11f3b27e8d
SHA1: 328c8ea8187ee129ccae00f9d09c2687a732cef7
SHA256: 52f348cd3a5de905e29f2347dbc54b3a875df76b544bec5cf8602a2b76839260
SHA512: 3f26b53cac908d742bee394c021127b254f7d71fe699a83eaeeac9891b1e807ddc4e9847f6252f568cb750d1134b927e4f37a9e8963c7ed6b4729bf335d9997d
Description-en: Tool to format C/C++/Obj-C code
Clang-format is both a library and a stand-alone tool with the goal of
automatically reformatting C++ sources files according to configurable
style guides. To do so, clang-format uses Clang's Lexer to transform an
input file into a token stream and then changes all the whitespace around
those tokens. The goal is for clang-format to both serve both as a user
tool (ideally with powerful IDE integrations) and part of other
refactoring tools, e.g. to do a reformatting of all the lines changed
during a renaming.
.
This is a dependency package providing the clang format tool.
Description-md5: b50362fb3abbe4fca65017f3e1c209b3