Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use fpm once for each package format, while keeping the application files and shared metadata in one configuration. For a staged directory, select the directory source with -s dir, choose an output with -t deb, -t rpm, -t pacman, or another supported target, then map the files and declare metadata. A shared .fpm options file lets the same name, version, dependencies, maintainer, and file mappings produce several packages without copying a long command.

FPM does not make every package format identical. Debian, RPM, Pacman, and Alpine packages have different dependency syntax, architecture labels, script behavior, compression defaults, and repository policies. Build each target, inspect its metadata, and test installation, upgrade, and removal on the distributions you actually support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand fpm’s source-to-target model

FPM’s central model is simple: provide a source type, choose a target type, and supply the source inputs. The documentation summarizes it this way: “Given a source and a target, FPM can convert all the source files into a package of the target format.” The source describes where the payload and metadata come from; the target determines the package format that fpm writes.

For a locally assembled application, the most predictable source is a staging directory. You place files in the paths they should occupy on the installed system, then map that directory into the package. The same staged tree can be emitted as a Debian package, an RPM, a Pacman package, or another format by changing only the target and output filename.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

The three inputs to every build

  • Source type: selected with -s or --input-type, such as dir, gem, or npm.
  • Output type: selected with -t or --output-type, such as deb, rpm, pacman, or apk.
  • Source inputs: files, directories, package names, or existing packages that fpm converts.

Keeping those concepts separate makes multi-format packaging manageable. You can change the target without rebuilding the application tree, and you can change the input source without changing the general metadata workflow.

Prepare a clean staging tree

Build from a directory containing only files intended for the package. This prevents editor backups, test artifacts, local credentials, and build logs from silently entering the archive. It also makes the file-to-destination mapping easy to review.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For the example application, create a layout such as:

hello-world-staging/
├── hello-world
└── hello-world.1

The two files will be installed as /usr/bin/hello-world and /usr/share/man/man1/hello-world.1. The names on the left side of each mapping are local paths; the names on the right are paths inside the installed package.

Before invoking fpm, check ownership and permissions in the staging area. Executables should be executable, manual pages should be readable, and files should not retain a developer’s private ownership. If a package must create writable directories at install time, declare those directories deliberately rather than including an entire working tree.

Build a first Debian package

This command follows the documented fpm directory-source pattern:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
fpm 
  -s dir -t deb 
  -p hello-world-0.1.0-1-any.deb 
  --name hello-world 
  --license agpl3 
  --version 0.1.0 
  --architecture all 
  --depends bash --depends lolcat 
  --description "Say hi!" 
  --url "https://example.com/hello-world" 
  --maintainer "You The Amazing Person <you@example.com>" 
  hello-world=/usr/bin/hello-world 
  hello-world.1=/usr/share/man/man1/hello-world.1

-s dir tells fpm to read local files. -t deb selects the Debian handler, and -p sets the exact output path. The example uses all because the application is an architecture-independent script; compiled binaries normally require the architecture for which they were built. Repeating --depends records both runtime dependencies.

The command’s metadata is part of the package, not decoration. Package managers use the name, version, architecture, dependency declarations, and maintainer information when deciding whether a package can be installed, upgraded, or removed. Set each value intentionally instead of relying on defaults.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

What each important option controls

Option Purpose Example
-s or --input-type Selects the source handler -s dir
-t or --output-type Selects the package format -t deb
-p or --package Sets the generated package path -p hello-world-0.1.0-1-any.deb
-n or --name Sets the package name --name hello-world
-v or --version Sets the application/package version --version 0.1.0
-a or --architecture Sets the package architecture label --architecture all
-d or --depends Adds a runtime dependency; repeat it for multiple dependencies --depends bash
--config-files Marks installed paths as configuration files --config-files /etc/hello-world.conf
--directories Declares directories that belong to the package --directories /var/lib/hello-world
--prefix Applies a prefix where the target handler supports it --prefix /opt
--workdir Chooses fpm’s working directory --workdir /tmp/fpm-build

Options such as --license, --description, --url, and --maintainer fill the package’s descriptive metadata. Keep descriptions useful to an administrator reading a package index; do not treat them as a substitute for dependency or configuration declarations.

Emit Debian and RPM packages from one configuration

Put values that should not change between formats in a file named .fpm. A typical shared file contains the source type, identity, dependencies, descriptive fields, and source mappings:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
-s dir
--name hello-world
--license agpl3
--version 0.1.0
--architecture all
--depends bash
--depends lolcat
--description Say hi!
--url https://example.com/hello-world
--maintainer You The Amazing Person <you@example.com>
hello-world=/usr/bin/hello-world
hello-world.1=/usr/share/man/man1/hello-world.1

With that file in the build directory, run one command per target:

fpm -t deb -p hello-world-0.1.0-1-any.deb
fpm -t rpm -p hello-world-0.1.0-1.x86_64.rpm

FPM reads the shared options, then applies command-line values. Command-line flags override values from the .fpm file, so the target and output path can stay outside the shared configuration. This arrangement gives every format the same payload and identity while allowing target-specific changes where they are necessary.

When to split target-specific settings

Do not force every option into one universal file. Debian and RPM may represent dependency versions differently, use different architecture names, or expect different script and configuration-file conventions. Keep common metadata in .fpm, then add target-specific flags on each invocation. If a target needs many special options, maintain a separate options file for that target and invoke it with --fpm-options-file as appropriate.

For example, an architecture-independent script can retain --architecture all for Debian, while an RPM build may need an architecture label that matches the RPM repositories where it will be published. The correct value depends on the artifact and the target ecosystem; do not copy a Debian architecture name into an RPM package without checking the target handler’s conventions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Package other source types

A directory is only one of fpm’s input handlers. The documented inventory includes npm packages, Ruby gems, Python applications, virtual environments, CPAN and PEAR modules, pkgin inputs, archives, existing packages, and empty packages.

NPM modules

Select the npm source handler and name the module, then choose a supported output:

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
fpm -s npm -t deb package-name
fpm -s npm -t rpm package-name
fpm -s npm -t pacman package-name
fpm -s npm -t tar package-name

Replace package-name with the npm package you intend to package. FPM obtains package metadata from npm for this source type. Verify the resulting name, version, dependency list, and installed file locations rather than assuming npm’s metadata maps perfectly to every operating-system package policy.

Ruby gems

The documented gem example turns the fpm gem into a Debian package:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
fpm -s gem -t deb fpm

The same source can be directed to another target supported by the gem handler. Inspect dependency translation, especially when a gem depends on native libraries or executables that are named differently by the operating system.

Python, virtualenv, CPAN, PEAR, pkgin, archives, and existing packages

Use the corresponding input handler listed by your installed fpm version. Existing Debian, RPM, and Pacman packages can themselves be inputs, allowing conversion to another target type. Tar and zip inputs are also represented in fpm’s packaging-type inventory. This is useful when an upstream build already produces a package or archive but your deployment environment expects another format.

Conversion is not proof that the result follows the destination distribution’s policy. A converted package may carry file paths, dependencies, scripts, ownership, or metadata that were valid only for the original format. Treat conversion as a starting point and apply the same inspection and installation tests as for a package built from a directory.

Choose among fpm’s output formats

FPM lists Debian, RPM, Pacman, Alpine APK, Solaris, FreeBSD, macOS package, Puppet, p5p, shell archive, tar, zip, snap, and directory-tree outputs. The following comparison focuses on the formats most often used for Linux distribution packages.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Target Typical use What to validate
deb Debian-family package managers Dependency names and versions, architecture label, configuration-file behavior, maintainer scripts, ownership, and compression
rpm RPM-based distributions RPM dependency syntax, release/iteration conventions, architecture label, script ordering, ownership, and compression
pacman Arch-family package managers Dependency mapping, install/upgrade/remove scripts, file ownership, and package metadata accepted by the target system
apk Alpine Linux packages APK-specific dependency and architecture conventions, scripts, ownership, compression, and repository policy
tar Portable archive distribution without a native package database Extraction paths, ownership, permissions, and any install procedure required after extraction

The table describes validation areas, not interchangeable behavior. FPM has format-specific handlers and flags, so an option accepted for one target may be ignored, translated, or unsupported for another. Build every target separately and inspect its native metadata with the package tools used by the target distribution.

Dependencies and version semantics

Repeat --depends for every runtime requirement. Name dependencies as the destination package manager names them, not necessarily as the upstream project names them. A shell command, shared library, or language module can have different package names across Debian, RPM-based, Arch, and Alpine systems. If the dependency needs a minimum or maximum version, use the syntax supported by that target and verify the generated metadata.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Architecture labels

Use all only when the payload is genuinely architecture-independent, such as a script that relies on declared interpreter dependencies. Native binaries, compiled extensions, and architecture-specific libraries need an appropriate target architecture. The filename is not enough: the architecture field inside the package must agree with the binary content and repository policy.

Configuration files and directories

Mark files that administrators are expected to edit with --config-files. This tells supported handlers to treat them differently from ordinary payload files during upgrades or removal. Use --directories for package-owned directories that need explicit declaration. Test what happens when an administrator changes a configuration file before upgrading; a package that overwrites local policy can cause an avoidable outage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add installation, upgrade, and removal scripts carefully

FPM exposes lifecycle options for actions before and after installation and upgrade, including --before-install, --after-install, --before-upgrade, and --after-upgrade. The CLI reference also documents the install/remove/upgrade script family for Debian, RPM, and Pacman packages. Do not assume the same scripts or ordering are available for every output type, particularly APK and archive outputs.

Use scripts only for work that cannot be represented by files and metadata. Typical examples include creating a runtime user, migrating a data directory, or registering a service. Scripts should be idempotent, fail clearly, avoid interactive prompts, and preserve administrator-managed configuration. Keep them under version control and test fresh installation, upgrade from the previous release, downgrade if your release process permits it, and removal.

Make builds repeatable

FPM’s current CLI reference documents --source-date-epoch-default and --source-date-epoch-from-changelog. These options let a build use a controlled source-date epoch rather than whatever clock time happens to be present on the builder. The changelog-based option is described as experimental and is currently implemented for gem input.

Reproducibility also depends on the inputs you control. Build from a clean staging directory, sort or otherwise stabilize generated file lists before mapping them, pin application dependencies outside fpm, and keep the same metadata file in version control. Compare package contents and metadata for each target; a matching checksum is meaningful only when the build inputs and target toolchain are controlled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Inspect and test every generated package

Creating a file with the expected extension is not the end of the build. For each target:

  1. Confirm the package filename includes the intended name, version, release or iteration, and architecture.
  2. List the archive contents and check every destination path, permission, and ownership.
  3. Read the native metadata and verify dependencies, description, license, maintainer, URL, configuration-file declarations, and scripts.
  4. Install it in a clean virtual machine or container running the distribution you support.
  5. Exercise the application as a normal user, not only as root.
  6. Change a configuration file, install the next version, and verify the upgrade behavior.
  7. Remove the package and check that package-owned files disappear while administrator data is handled according to your policy.
  8. Resolve dependencies using the target distribution’s package manager and record any names that must differ between formats.

Run these checks independently for Debian, RPM-based, Arch-family, and Alpine environments. A package that installs successfully on one distribution can still fail because of a different dependency name, service convention, architecture label, script interpreter, or filesystem policy.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Troubleshoot common multi-format failures

Files appear in the wrong location

Review each source-to-destination mapping. The left side must exist in the build context, while the right side must be the absolute path intended for installation. Rebuild from a clean staging directory so a stale file cannot mask a typo.

The package installs but the command cannot run

Check the executable bit, interpreter line, architecture, and runtime dependencies. A script packaged as all still needs its interpreter and utilities declared as dependencies. A native binary built for one architecture cannot be repaired by changing the package label.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Dependencies cannot be resolved

Compare the dependency names generated for each target with the names in the repositories used by your test system. Translate names per target instead of assuming one list is portable. If a dependency is optional, do not declare it as mandatory merely to make a local test pass.

An upgrade overwrites local configuration

Ensure the path is marked with --config-files and test the target handler’s upgrade semantics. Keep mutable data outside the package payload where possible, and make migration scripts preserve existing administrator changes.

A lifecycle script works on one target but not another

Check whether the target supports that script family and whether the script relies on distribution-specific commands or paths. The documented script support covers Debian, RPM, and Pacman; other output types require separate confirmation and may need a different deployment mechanism.

The two packages contain different files

Compare the shared .fpm file, command-line overrides, and target-specific options. Then list both package contents. Differences may be intentional when a handler applies target conventions, but an unexpected omission usually indicates a path mapping or option that was supplied only to one invocation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a repeatable release layout

A practical repository can keep the application source, a generated staging directory, one shared .fpm file, and a small build script. The build script should clean the staging area, populate it from a known source revision, run fpm once per supported target, and place all artifacts in a dedicated output directory. Keep target-specific flags next to the command that uses them so reviewers can see why the formats differ.

Do not publish an artifact merely because fpm completed without an error. Gate publication on metadata checks and installation tests for each distribution family. Sign packages and publish them through the repository and key-management process required by your organization and the destination ecosystem; fpm creates package files but does not make a universal signing or repository policy for you.

Decision checklist

  • Is the source a clean, intentional directory or a documented fpm input handler?
  • Does the package name, version, release or iteration, license, URL, maintainer, and description match the release?
  • Are architecture and dependencies correct for this target?
  • Are configuration files, directories, ownership, and permissions declared deliberately?
  • Are lifecycle scripts necessary, supported by this target, and safe on install, upgrade, and removal?
  • Does the same shared .fpm configuration produce the expected payload in every format?
  • Have you inspected and installed each package on the actual distributions you support?
  • Are reproducibility settings and build inputs controlled well enough for your release requirements?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.