How to Install and Uninstall flex Package on Ubuntu 21.04 (Hirsute Hippo)

Last updated: April 29,2024

1. Install "flex" package

This is a short guide on how to install flex on Ubuntu 21.04 (Hirsute Hippo)

$ sudo apt update $ sudo apt install flex

2. Uninstall "flex" package

Please follow the steps below to uninstall flex on Ubuntu 21.04 (Hirsute Hippo):

$ sudo apt remove flex $ sudo apt autoclean && sudo apt autoremove

3. Information about the flex package on Ubuntu 21.04 (Hirsute Hippo)

Package: flex
Architecture: amd64
Version: 2.6.4-8
Multi-Arch: foreign
Priority: optional
Section: devel
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Manoj Srivastava
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 988
Pre-Depends: debconf | debconf-2.0
Depends: libc6 (>= 2.26), m4
Recommends: gcc | c-compiler, libfl-dev
Suggests: bison, build-essential, flex-doc
Filename: pool/main/f/flex/flex_2.6.4-8_amd64.deb
Size: 297884
MD5sum: 33bc3ffb6d573a39f0a0b0981215cb80
SHA1: 861faf6e946a8779dc35081bbdaef0dcb49edcf0
SHA256: 2a9827a2e81a5109f3764e84bcdee039f8cc6abfd693b83b394f61dd01052f2e
SHA512: 487244046ec5e29b98dc4c3d45024da82971dfb9ef60495c5ccff2927a3f50163ae5d8fdc029a633c4bcec4891e309be0775e6da993166664522c42d0fb63482
Homepage: https://github.com/westes/flex
Description-en: fast lexical analyzer generator
Flex is a tool for generating scanners: programs which recognized lexical
patterns in text. It reads the given input files for a description of a
scanner to generate. The description is in the form of pairs of regular
expressions and C code, called rules. Flex generates as output a C source
file, lex.yy.c, which defines a routine yylex(). This file is compiled
and linked with the -lfl library to produce an executable. When the
executable is run, it analyzes its input for occurrences of the regular
expressions. Whenever it finds one, it executes the corresponding C code.
Description-md5: c30a7ef9a61fca3debe97b92c3f65013