Monthly Archives: December 2025

detox : A “lazy” way to remove spaces in filenames in Linux

There’s several ways to remove spaces from file names. For other options see this post that I found with a search engine search.

In this writing I’ll write about an easy way with a tool called detox.

On Debian/Ubuntu/Linux Mint or any other Debian or Devuan based Linux, open a terminal and type or copy&paste :

sudo apt-get install detox

After that, if you want to remove spaces from all your ODT (LibreOffice) files, type :

detox *odt

After this is done for example your “Notes from last night’s meeting.odt” will be renamed to “Notes_from_last_night_s_meeting.odt” or something like that.

There’s some exceptions that detox will not be able to convert.

If you did save your file like this for exampleย  :

“‘Notes from today’s meeting.odt'” detox will not succeed. The combination of the ‘ and ” characters are a show stopper.

If you want to learn more about detox command-line options, for example the recursive and the dry-run option, type :

detox -h

Have a nice “lazy” detox day!