How to Use Apt-Offline to Install Debian or Ubuntu Packages

告别网络依赖:手把手教你用apt-offline工具搞定Ubuntu 22.04的GCC离线安装 本文详细介绍了如何使用apt-offline工具在Ubuntu 22.04系统中离线安装GCC编译器。通过自动化依赖解析和标准化操作流程,apt-offline解决了传统离线部署的复杂性问题,特别适用于无网络环境的服务器运维和开发场景。文章包含从生成签名文件到最终安装的完整步骤,以及高级用法和常见问题解决方案。 阅读详情

What is Apt-Offline?

Apt-Offline is an amazing command-line tool in Linux, particularly designed for Debian or Debian-based distributions like Ubuntu, Linux Mint, or Pop!_OS, allowing users to perform package management tasks on a system without internet access.

This is especially handy for installing or updating packages and their dependencies on a computer without internet access. You can download the necessary packages from a different system with internet access and transfer them to the offline system for installation or updates.

Don’t worry if your online system is running a different operating system like Windows; you can still download the packages because this tool is cross-platform, written in Python, and offers both CLI and GUI options.

Tutorial Details

DescriptionApt-Offline
Difficulty LevelModerate
Root or Sudo PrivilegesYes
OS CompatibilityDebian, Ubuntu, Linux Mint, etc.
Prerequisites–
Internet Required–

📝

This tool isn’t designed for upgrading your entire system from an earlier distribution version to the latest one (e.g., Ubuntu 20 to 22).

Prerequisites for the Offline Update and Upgrade Process

  • A Windows or Linux system with internet connectivity for downloading packages, which can be your workplace, school, cyber cafe, etc.
  • An “offline system” for installing the above downloaded packages, which should be compatible with Debian or Debian-based distributions.
  • Transfer downloaded packages from an online system to an offline system using either a USB or a hard disk.

How to Install Apt-Offline on Online and Offline Systems

Let’s begin the installation of this tool on your online system and then offline system using the following steps:

Installing Apt-Offline on Linux or Windows (🟢 Online System)

Assuming you have a Debian-based distribution like Ubuntu, Linux Mint, or any other, you can easily install it on this system using the APT package manager.

$ sudo apt install apt-offline

If you’re using Ubuntu 22.04 LTS (Jammy Jellyfish) or Ubuntu 20.04 LTS (Focal Fossa), then running the above command will install an older version (1.8.4) of Apt-Offline, which has Python-related deprecation issues.

To avoid this, consider downloading and installing version 1.8.5 from Ubuntu 23.04 (Lunar Lobster) from [pkgs.org](https://pkgs.org/download/apt-offline) and using the “sudo apt --fix-broken install” command if any broken package error occurs.

For instance, if your online system is running on Windows, you can easily download the Python package for this tool from the project release page.

Installing Apt-Offline on Debian or Ubuntu (🔴 Offline System)

If your offline system has even low-speed internet access, you can still use the previously mentioned steps to install Apt-Offline via the APT package manager.

However, if there is no internet access, you can download an Apt-Offline deb package from [pkgs.org](https://pkgs.org/download/apt-offline) on an internet-connected system and then transfer it to your offline system and install it by running:

$ sudo dpkg -i apt-offline_*_all.deb

Now that we have installed Apt-Offline in both our online and offline systems, let us look into the steps required to download packages from the online system and then install them on the offline system.

Ezoic

Update and Upgrade Offline Debian-based Distribution via Apt-Offline

To begin the update or upgrade process for your offline Debian-based distribution using Apt-Offline, you need to perform the below steps.

  1. Access your offline system, create a directory with any preferred name within your home directory, such as “LocalPackage“, and generate a database file that lists all the packages requiring updates.
  2. Transfer the “LocalPackage” directory containing the database file to your online system using a USB or any other suitable method, and proceed to download all the package updates mentioned in the database file.
  3. Finally, transfer the downloaded package update to your offline system via USB or any other suitable method, and proceed to install all of the package updates using Apt-Offline.

Let’s perform these steps practically and update our offline system, waiting for updates.

1. Generating an Apt-Offline Signature File on the Offline System

Create a directory with any preferred name in your home directory, such as “LocalPackage“, and navigate into it via the cd command.

$ mkdir ~/LocalPackage
$ cd ~/LocalPackage

Output:

Creating a directory to store signature file for package update

Then run the following command to generate the signature file name “apt-offline.sig“, which contains information about the packages that need to be downloaded.

$ sudo apt-offline set --update --upgrade apt-offline.sig

Output:

Generating signature file for the lists of software you want to install or update

The above result indicates the successful creation of a signature file for updating the APT database and upgrading necessary packages.

If you want to create a signature file for specific packages (e.g., package1 and package2), then you can use the following command:

$ sudo apt-offline set apt-offline.sig --install-packages package1,package2

Now, copy the “LocalPackage” directory containing the signature file from your offline to your online system via USB or any other suitable method.

Ezoic

2. Downloading Package Updates Using Apt-Offline from the Online System

If you’ve placed the “LocalPackage” directory in your home directory on your online system, start by entering that directory.

$ cd ~/LocalPackage

Then, run the following command:

$ sudo apt-offline get apt-offline.sig --threads 2 --bundle apt-offline-bundle.zip

Output:

Downloading packages required update from signature file

It will begin the process of downloading the package requiring an update based on the signature file and bundle all the downloaded packages in a single archive file named “apt-offline-bundle.zip” in the current working directory.

Also, feel free to tweak the “--threads 2” option to perform more parallel downloads, but with caution as it might create issues like network congestion and timeouts.

Now, you have to wait a few minutes based on your list of packages wanting updates and internet speed on your online system. Once the process is finished, you will get the following output and a file named “apt-offline-bundle.zip” in your “LocalPackage” directory.

Ezoic

Now, copy the “LocalPackage” directory containing the “apt-offline-bundle.zip” archive file from your online to offline system via USB or any other suitable method.

3. Applying the Package Updates Using Apt-Offline on the Offline System

Assuming you’ve placed the “LocalPackage” directory in your home directory on your offline system, start by entering that directory.

$ cd ~/LocalPackage

Then, begin the update process from the downloaded packages in the archive file by running:

$ sudo apt-offline install apt-offline-bundle.zip

Output:

installing all the downloaded packages

It will begin updating the APT database and upgrading the necessary packages with their dependencies from the downloaded packages in the archive file.

That’s it! You’ve successfully updated or installed software on your offline system without needing an internet connection on that computer.

Final Word

This is helpful when you have one computer with internet access that can assist in keeping another computer up to date.

Now, if you have any questions or have encountered any errors while following the steps mentioned in this article, feel free to reach out to us in the comment section.

Ubuntu换源实战:superupdate一键配置国内镜像源 APT源是Ubuntu系统软件包管理的核心基础设施,其配置直接影响apt update效率与软件安装可靠性。理解Debian/Ubuntu的sources.list结构、镜像站同步机制及GPG签名验证原理,是保障系统稳定更新的技术基础。国内主流镜像站(如清华、阿里云)通过HTTPS协议、分钟级同步和全架构支持,显著提升大陆用户包索引获取速度。superupdate脚本正是基于这一技术背景设计的轻量级自动化工具,它规避了sed硬替换导致的安全源失效、版本代号错配等常见风险,采用动态重建+校验回滚机制,实现开箱 阅读详情

相关推荐

Ubuntu 14.04 部署 MemSQL 5.8.5 完整实践指南

内存数据库指在 RAM 中直接处理数据以实现亚秒级响应的存储系统,其核心依赖于二进制兼容性——即 CPU 指令集、GLIBC 版本、内核 ABI 与动态链接库(如 libjemalloc1)的严格匹配。MemSQL 作为典型的内存原生 SQL 数据库,曾广泛用于实时 OLTP 和分析场景,但因版本演进与发行版生命周期错位,导致在 Ubuntu 14.04 等经典系统上部署面临 APT 源归档、依赖包缺失、签名密钥过期等工程化挑战。本文聚焦真实运维现场,解析如何通过重建 old-releases 源、离线注入

333

apt-offline:离线APT包管理工具

apt-offline是一个专门为Debian及其衍生系统设计的离线包管理工具,它允许用户在无网络连接的计算机上安装、更新和管理软件包。通过使用apt-offline,您可以将所需的软件包及其依赖项从联网计算机传输到离线机器,实现完全离线的系统维护。 ## 功能特性 apt-offline提供以下核心功能: - **离线软件包安装**:在无网络连接的计算机上安装新的Debian/Ubuntu

gitblog_00114的博客 540

Ubuntu 16.04离线部署PostgreSQL 9.5实战指南

PostgreSQL 是一款开源关系型数据库,以强一致性、扩展性和标准SQL支持著称;其核心原理依赖于MVCC并发控制、WAL日志持久化及基于角色的细粒度权限模型。在政企等保、教育及嵌入式等存量系统中,因硬件兼容性、驱动适配或合规基线冻结,Ubuntu 16.04 仍被广泛使用——此时 PostgreSQL 9.5 成为唯一官方完整支持的稳定版本。该组合具备高可靠性与低维护成本的技术价值,适用于老旧服务器迁移、等保整改、离线审计环境及遗留系统复现等关键场景。本文聚焦真实运维约束:无外网、无root外权限、禁

weixin_30588675的博客 390

Ubuntu22.04系统版本 apt-offline 离线安装包

下拉查看,点击deb文件进行下载即可。

zengliguang的专栏 1832

保姆级避坑指南:从源码编译到Docker部署Triton Inference Server 23.12

本文提供Triton Inference Server 23.12版本的完整部署指南,涵盖从源码编译到Docker镜像优化的全流程。针对国内开发者常见的网络问题和编译错误,提供详细的避坑方案和性能调优技巧,帮助用户实现高效稳定的模型推理服务部署。

552

ros2 humble中使用realsense t265与d435

前提,安装realsense SDK 2.51.1版本并且能成功启动realsense-viewer V2.51.1想要在ros2中使用realsense t265,必须配合realsense SDK v2.51.1使用realsense-ros 4.51.1版本,因为新版本realsense ros2不再对t265支持下面记录源码编译安装 realsense-ros 4.51.1版本。

m0_72797388的博客 969

How to install a package in offline scenario in Ubuntu 24.04

How to install a package in offline scenario in Ubuntu 24.04

在路上 549

GMSL2 协议与技术 第一部分

默认情况下,自动的链路配置功能是使能的(AUTO_LINK = 1),这表示器件将试图锁定在single link模式,它将自动监测是否PHY-A或者PHY-B已经连接到了远端的器件,并且使能这个已连接的PHY,如果PHY-A和PHY-B同时连接到了远端的器件,它将使用首先探测到的连接进入single link 模式。另外,链路失锁同样也会发生在串行器或者解串器掉电的情况下,掉电的器件重新上电后,链路锁定会自动重新建立,而视频数据和控制通道的配置需要重新写入寄存器。

八哥望春的博客 4960

linux – Cloudera安装无法检测到CentOS上的root权限

我试图将新主机添加到CentOS集群中.它安装失败&在状态中给出“安装失败.无法检测到root权限”. 我知道Cloudera需要用户拥有无密码权限(“安装Cloudera软件包需要Root访问主机.此安装程序将通过SSH连接到您的主机,并以root用户身份或以无密码sudo的其他用户身份登录/ pbrun特权成为root.“).我怎样才能做到这一点?我试着编辑/ etc / sudoers文件. 编辑:在sudoers文件中,我添加了行: cdh ALL=(ALL): ALL #cdh is my

萌兔兔MMQ!! 1557

ArcGIS图解建模工具与DEM提取山脊、山谷线(水文分析、表面分析)

参考汤国安、杨昕等编著的《地理信息系统空间分析实验教程第二版》 利用水文分析(流量)和表面分析(坡向变率)得到山脊和山谷线 文章目录1、基本概念1.1 正地形1.2 负地形正负地形的影响2、水文分析方法2.1 基本思想原理2.2 技术路线2.3 操作步骤2.3.1 正负地形的提取2.3.2 利用水文分析思想和工具提取研究区域的山脊线2.3.3 利用水文分析思想和工具提取研究区域的山谷线2.3.4 利用水文分析提取山脊线和山谷线结果3、表面分析方法3.1 基本思想原理3.2 技术路线3.3 操作步骤4、图.

fungis 1万+

5G RF前端架构为什么越来越复杂?从8天线、MIMO、ET、DRX到ACLR/EVM彻底拆开

AdjacentChannelLeakageRatioAdjacentChannelLeakageRatio主信道的功率,有多少泄漏到了隔壁Channel。ACLRPAdjacentPMainACLR=ACLRPMain​PAdjacent​​通常以dBc表达。

weixin_43199439的博客 57

万字干货|Ubuntu24.04 虚拟机安装、网络、软件包、容器运行时全流程拆解

本文基于 Ubuntu24.04 虚拟机环境,完整覆盖四大核心模块:系统纯净安装避坑方案、Netplan 静态 IP 与 DNS 深度解析、deb/dpkg/apt 全套软件包管理命令、工业级容器运行时 Containerd 架构 + 部署 + nerdctl 实操。包含镜像加速、私有仓库配置、网络 / 存储 / 命名空间管理等生产常用配置,适配 Linux 运维、K8s 云原生学习,零基础可跟着实操。

Augustsky12138的博客 501

【系统架构设计师-2024下半年真题】案例分析-参考答案及部分详解(完整回忆版)

根据h中描述,为了保证高可靠性,有ping/echo,心跳机制两种策略,从资源利用率问为啥心跳更好。王工觉得使用ping/echo好,但李工觉得从系统资源利用率来说,使用心跳机制好 1、针对质量属性可以使用ping/echo和心跳模式实现,分别简述ping/echo和心跳的实现原理。 2、张工认为心跳策略比较适合,简述为什么?

数据知道的博客 1万+

Ubuntu系统网络与包管理&工业级容器运行时containerd

很早之前的 Docker Engine 中就有了 containerd,现在已经 从 Docker Engine 里分离出来,作为一个独立的开源项目,目标是提供一个更加开放、稳定的容器运行基础设施。containerd 是 CNCF 毕业的工业级容器运行时(Container Runtime),强调简单性健壮性和可移植性向上:给 Kubernetes、nerdctl、crictl 等客户端提供标准化接口向下:对接 runc、crun 等 OCI 运行时,负责真正的容器启动/管理。

weixin_73616238的博客 260

【系统分析师】第2章-基础知识:数学与工程基础(核心总结)

数学与工程基础

数据知道的博客 6821

验证方法、符合性方法与设计保证的关系

未来,随着适航标准和工程实践的不断演进,验证与符合性方法将持续优化,以应对日益复杂的系统设计需求。设计保证过程中的验证活动具有双重作用,既用于设计过程的质量控制和风险管理,又作为适航符合性方法的重要支持材料。在未来的航空电子系统开发中,进一步优化设计保证与验证活动的协同作用,将有助于应对日益复杂的工程挑战,推动航空安全技术的发展。为了全面理解这二者之间的关系,本章将系统说明设计保证过程中的验证活动如何既服务于设计保证,又作为符合性方法中的核心证明材料。最终,通过功能测试和环境测试验证硬件的实际性能。

qq_41854911的博客 559

Ubuntu 18.04 安装 Nginx 正确方法:绕过 EOL 源与编译陷阱

Nginx 是广泛使用的高性能 Web 服务器与反向代理,其核心价值在于稳定、轻量与高并发处理能力。在 Linux 系统中,APT 包管理是主流安装方式,但 Ubuntu 18.04 已于 2023 年结束生命周期(EOL),官方源失效、默认 nginx 版本陈旧(1.14.0)、缺失 HTTP/2 和 TLS 1.3 支持,并存在 CVE-2021-23017 等高危漏洞。直接使用 apt install 或源码编译均易引发依赖冲突、ABI 不兼容及部署不可复现等问题。本文聚焦 EOL 系统下的安全可控交

weixin_30824599的博客 405

C++和OpenGL实现3D游戏编程【连载7】——文字和汉字的显示(附源码)

上一节我们讨论了纹理在二维平面内不规则图形贴图的相关基础操作,本节我们开始了解游戏里文字以及汉字的显示方法。本节课我们将从基本的ASCII字符显示,拓展到中文字符的显示,最后再讲到纹理字符的显示,并对各种文字显示方法的优缺点和使用场景进行分析,这节课将使用到显示列表、兼容视图、屏幕图形转纹理等操作。

zhooyu的博客 1505

Ubuntu 14.04 LTS 安装 Nginx 1.4.6 实战指南

Nginx 是一款高性能的开源 Web 服务器与反向代理软件,其核心原理基于事件驱动异步非阻塞 I/O 模型,依托 Linux epoll 机制实现高并发处理能力。在传统运维、遗留系统维护、安全审计及学术复现等场景中,精准部署特定版本(如 Ubuntu 14.04 LTS 所含的 Nginx 1.4.6)具有不可替代的技术价值。该版本虽已停止官方支持,但仍完整支持 HTTP/1.1、SSL 终止、反向代理与静态服务等关键功能,且与 Trusty 系统库(如 libc6=2.19、OpenSSL 1.0.1f

weixin_30617737的博客 420

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Ubuntu 12.04 配置只发不收的 Exim 邮件服务器

邮件传输代理(MTA)是 Linux 系统实现告警通知的基础组件,其核心原理在于将本地程序生成的邮件通过 SMTP 协议转发至中继服务器。在老旧系统运维中,'send-only' 模式因其零监听、无收信、低攻击面的技术价值,成为监控脚本与日志告警场景的首选方案。典型应用包括磁盘满载、服务宕机等关键事件的自动化邮件通知,尤其适用于 Ubuntu 12.04 等已终止支持的 LTS 系统。本文聚焦 send-only 配置实践,涵盖 apt 源适配、exim4-daemon-light 轻量部署、smartho

weixin_33885676的博客 431

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

IB-Robot Ubuntu 22.04 Docker 端到端验证全流程指南:从 Phase 0 到 Phase 6 的 setup.sh 与 build.sh 可复现验证

本文是 IB-Robot 仓库中 `ibrobot-docker-verify` 技能的完整实战手册:它定义了在一台干净的 Ubuntu 22.04 ROS 2 Humble desktop-full Docker 容器内,对工作区的 `setup.sh` 与 `build.sh` 进行端到端验证的六个(加一个条件)阶段,并给出每一阶段的完整 bash 命令、环境变量语义、成功判据与最终报告模板。

gitblog_00718的博客 214

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

MegaCLI Raid管理工具

整理在CentOS 7.9和Ubuntu 24.04上,MegaCLI 工具的安装与常用命令。

shijin741231的博客 2512

PyTorch 1.10离线安装实战:手把手教你在内网服务器部署CUDA 11.3环境

本文详细介绍了PyTorch 1.10在内网服务器上的离线安装方法,重点解决CUDA 11.3环境部署的难题。通过分步指导、依赖树解析和系统级依赖处理,帮助用户高效完成AI框架的离线部署,适用于企业研发和高校实验室环境。

weixin_30908941的博客 423

10 分钟用 KMS_VL_ALL_AIO 激活 Win 7-11 与 Office

桌面右下角挂着"激活 Windows"水印,Word 顶部还有灰色未许可提示。KMS_VL_ALL_AIO 是个开源激活脚本,在本机模拟企业 KMS 服务器,让 Win 7 到 11、Office 2010 到 2024 都能完成本地激活并持续自动续期。整个项目只有 3 个文件,功能全在一个 .cmd 里。 ## 看懂原理:把 KMS 服务器搬到本机 KMS 是微软为企业设计的授权机制:局域网

gitblog_01181的博客 280

LeetCode 876 链表的中间结点:快慢双指针解法详解(LeetCode-Book 实战解析)

本文以 LeetCode-Book 仓库中 876. 链表的中间结点.md 为骨架,系统讲解「快慢双指针」这一经典链表技巧:如何在**单次遍历**、**常数空间**下定位链表的中间节点,并剖析奇数/偶数长度链表的行为差异。读完本文,你将掌握快慢指针的循环不变式推导方法、边界条件的正确写法,以及将解题思路落地为 Python / Java / C++ 三种语言的完整工程实践。 ## 一、问题定义:

gitblog_01102的博客 350
上一篇: Creating a Local APT Repository on Linux
下一篇: apt-offline – Fully Upgrade Offline Debian-based Distributions
allway2
博客等级 码龄16年 6723粉丝 8038原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值