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 the package manager that matches the operating system family: apt for Debian and Ubuntu, dnf (or legacy yum) for Fedora and other RPM-based systems, and pkg for FreeBSD binary packages. Refresh repository metadata first, inspect the package and proposed transaction, then install, upgrade or remove it with the matching command set.

The commands look similar, but the package formats, repositories, dependency policies and source-build options differ. The guide below shows the safe workflow and explains when a binary package or a source-based port is the better fit.

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

Which package manager belongs to which system?

A package manager is the administrator-facing part of a distribution’s software supply chain. It obtains package metadata from configured repositories, resolves dependencies, verifies package data according to the platform’s policy, and records which files and packages are installed.

Operating-system family Primary package tool Package ecosystem Important qualification
Debian, Ubuntu and derivatives apt Debian packages managed at a low level by dpkg apt-get remains the preferred interface for scripts and advanced use.
Fedora and other RPM-based distributions dnf RPM packages Fedora replaced yum with dnf beginning with Fedora 22; older systems and some Red Hat documentation still use yum terminology.
FreeBSD pkg Prebuilt FreeBSD binary packages pkg is not a replacement for the Ports Collection, which builds software from source.

Do not choose a command because it worked on another machine. First identify the operating system and release, then use repositories intended for that release. On Linux, inspect /etc/os-release. On FreeBSD, use the system’s release information (for example, freebsd-version) before changing package sources.

#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.

What happens during a package operation?

Repository metadata comes first

Repositories publish indexes describing package names, versions, checksums, dependencies and relationships. A metadata refresh downloads current indexes; it does not, by itself, upgrade every installed package. If the indexes are stale, a package may appear unavailable or the resolver may propose an old version.

The resolver builds a transaction

When you request an installation or upgrade, the manager calculates a transaction: packages to add, replace, upgrade, downgrade or remove. Dependency relationships can make the transaction larger than the package named on the command line. Read that summary, especially removals and changes to core libraries, before confirming.

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.

The database records ownership

APT ultimately relies on Debian’s dpkg package database; dnf and yum operate in the RPM ecosystem. FreeBSD’s pkg records installed binary packages in its own database. This ownership information lets the manager upgrade files consistently and remove a package without guessing which files belong to it.

APT on Debian and Ubuntu

APT is Debian’s high-level interface to the Debian packaging system. It is designed for interactive administration and resolves dependencies from the repositories configured for your release. The lower-level dpkg tools remain part of the system, but ordinary repository work is normally done with apt.

Refresh, search and inspect

  1. Refresh indexes: sudo apt update.
  2. Search package names and descriptions: apt search TERM.
  3. Inspect a candidate package, version and description: apt show PACKAGE.

Use the same release’s repositories when refreshing. Mixing Debian and Ubuntu repositories, or mixing releases, can produce unsatisfied dependencies and replacement packages that were never tested together.

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

Install and remove

Install a package with sudo apt install PACKAGE. APT may select additional packages required by the requested software. To remove the named package while generally retaining configuration files, use sudo apt remove PACKAGE. Review the proposed removals; a request to remove a desktop metapackage or a foundational library is a reason to stop and investigate rather than confirm.

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

Upgrade the system

sudo apt upgrade upgrades installed packages without making the more disruptive dependency changes that a complete distribution transition may require. apt full-upgrade permits a broader resolver decision when packages must be added or removed to complete the upgrade. Neither command changes the release by itself; release changes follow the distribution’s separate upgrade procedure.

Clean up unused dependencies

sudo apt autoremove proposes packages that were installed as dependencies and are no longer required by packages you elected to keep. Inspect the list before accepting: a package you still use indirectly may be marked removable if it is no longer declared as a dependency.

When to use apt-get

Debian documents apt-get as the established command for scripts and advanced operations. Interactive administrators commonly use the shorter apt interface, while automation should use the interface and options documented for the target release and test its exit status and transaction behavior.

DNF and YUM on RPM-based systems

RPM is the package format and ecosystem underneath Fedora, Red Hat Enterprise Linux and many related distributions. DNF and YUM are repository-aware tools that install, query, update and remove RPM packages while solving dependencies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

DNF on current Fedora-style systems

Fedora’s documentation records that, as of Fedora 22, yum was replaced by dnf. Use the command supplied by the installed release rather than assuming a command from an older tutorial.

  1. Refresh or prepopulate repository metadata: sudo dnf makecache. A normal DNF transaction may also refresh metadata when required.
  2. Search available packages: dnf search TERM.
  3. Install software: sudo dnf install PACKAGE.
  4. Upgrade installed packages: sudo dnf upgrade.
  5. Remove software: sudo dnf remove PACKAGE.
  6. Remove dependencies no longer needed: sudo dnf autoremove.

DNF also accounts for weak dependencies: relationships that are recommended but not strictly required. That policy can cause additional packages to be selected, so read the transaction summary instead of treating the named package as the complete change.

YUM on legacy or documented RHEL workflows

On systems that provide YUM, the corresponding commands are yum search TERM, yum install PACKAGE, yum update, yum remove PACKAGE and the system’s metadata-refresh operation. Red Hat documentation continues to describe YUM terminology for RHEL workflows, while Fedora users should follow the DNF command set shipped with their release. Do not install a second package manager merely to match an online example.

Upgrade semantics and release boundaries

dnf upgrade and yum update update packages available from the enabled repositories. They do not automatically change the operating-system release unless you follow a release-specific migration path. Repository files, enabled modules or third-party sources can change the resolver’s choices, so keep them aligned with the exact release and architecture.

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

pkg on FreeBSD: binary packages versus Ports

FreeBSD’s pkg(8) interface registers, adds, removes and upgrades packages. It works with binary packages built for FreeBSD; it is not a replacement for the Ports Collection.

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.

Install and maintain binary packages

  1. Refresh the package catalog: pkg update.
  2. Search available names and descriptions: pkg search TERM.
  3. Install a package: sudo pkg install PACKAGE.
  4. Upgrade installed packages: sudo pkg upgrade.
  5. Delete a package: sudo pkg delete PACKAGE.
  6. Remove dependencies no longer required: sudo pkg autoremove.

Use pkg clean to remove cached package files when storage is needed. To check installed packages against FreeBSD’s known vulnerability data, run pkg audit -F; investigate the reported package and apply the available update or remediation.

When Ports is the right workflow

The Ports Collection builds software from source under FreeBSD’s port framework. Choose it when you need source-level options or a port configuration that is not represented by the available binary package. Building from source takes longer and introduces compiler, library and option decisions that you must maintain. Do not alternate casually between a port-built installation and a binary package of the same software without understanding how the selected configuration and dependency records will be reconciled.

Command comparison

The following commands cover the common interactive workflow. Exact options and transaction behavior vary by release, so read the local manual page before scripting a destructive operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Task Debian/Ubuntu Fedora/RHEL FreeBSD
Refresh metadata sudo apt update sudo dnf makecache or the refresh performed by a transaction pkg update
Search apt search TERM dnf search TERM / yum search TERM pkg search TERM
Inspect package information apt show PACKAGE Use the release’s DNF/YUM information or query command Use the local pkg query facilities
Install sudo apt install PACKAGE sudo dnf install PACKAGE / yum install PACKAGE sudo pkg install PACKAGE
Upgrade all sudo apt upgrade or apt full-upgrade sudo dnf upgrade / yum update sudo pkg upgrade
Remove sudo apt remove PACKAGE sudo dnf remove PACKAGE / yum remove PACKAGE sudo pkg delete PACKAGE
Remove unused dependencies sudo apt autoremove sudo dnf autoremove sudo pkg autoremove

A safe package-management workflow

  1. Identify the platform and release. Check the distribution family, release, architecture and whether the machine is production-critical. A command copied from another family can fail or, worse, modify the wrong repositories.
  2. Check repository configuration. Ensure enabled sources belong to that release and use trusted signing and transport settings supplied by the distribution or an administrator you trust. Disable an obsolete third-party source rather than forcing it to participate in a release upgrade.
  3. Refresh metadata. Run apt update, the appropriate DNF/YUM metadata operation, or pkg update. If this step reports a signature, network or release mismatch, fix that before installing anything.
  4. Search and inspect. Confirm the package name, available version, description and required dependencies. Similar names can represent a command-line client, development files, a server or a metapackage.
  5. Review the transaction. Look for unexpected removals, a large change to core libraries, a repository from the wrong release or a downgrade. Cancel if the proposed set is not what you intended.
  6. Apply and verify. Run the install, upgrade or removal command, then launch the software or inspect its service status as appropriate. Keep logs of changes on systems where reproducibility matters.
  7. Maintain regularly. Apply available updates on a schedule appropriate to the system, remove stale dependencies deliberately, and use FreeBSD’s pkg audit -F when managing FreeBSD packages.

Package managers are not universal rollback systems. Before a broad upgrade, use the operating system’s backup or snapshot facility when available, and know how you will restore service if a new library or configuration change is incompatible.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Repository, dependency and upgrade pitfalls

“Package not found”

First refresh metadata and verify the spelling. The package may not exist in the enabled repositories, may have a different name on this distribution, or may be unavailable for the current release or architecture. Do not solve the message by adding an unrelated distribution’s repository.

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.

Conflicting or unsatisfied dependencies

Check for mixed releases, disabled base repositories, pinned or held packages, and third-party packages that require a different library version. Return repository configuration to a consistent release, refresh indexes again, and let the resolver recalculate the transaction. Manually deleting dependency files usually makes the database state worse.

Unexpected removals

A broader upgrade operation can remove packages when dependency relationships change. Stop and inspect the complete list, particularly if a desktop environment, kernel, networking stack or other essential group is included. A smaller, conservative upgrade may be safer while you investigate the repository or package constraint.

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

Stale or damaged metadata

Network failures, expired metadata or interrupted downloads can leave an incomplete catalog. Repeat the platform’s metadata refresh after correcting connectivity and repository errors. Avoid interrupting a package transaction; if one was interrupted, use the recovery procedure documented for that operating system before starting another transaction.

Mixing binary and source workflows on FreeBSD

A port built with custom options and a repository binary may not represent the same dependency choices. Decide which workflow owns that software, record non-default options, and follow the FreeBSD documentation for transitions rather than forcing an overwrite.

Choosing apt, yum, dnf or pkg in practice

  • On Debian or Ubuntu: use apt interactively, with apt-get where scripts or advanced, stable command behavior require it. Remember that apt update refreshes indexes; it is separate from upgrading installed packages.
  • On modern Fedora: use dnf. A tutorial that says yum may target an older release.
  • On a legacy or RHEL workflow that supplies YUM: use the command available on that host and follow its release documentation rather than substituting Fedora-specific instructions.
  • On FreeBSD: use pkg for supported binary packages and Ports when a source build and its configuration options are genuinely required.

Command similarity is convenient, not evidence that the systems are interchangeable. The repository metadata, package database, dependency policy and release support are controlled by the operating system family. Keeping those boundaries intact is the most reliable way to avoid a broken upgrade.

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.

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