On Mon, 12 Sep 2022, jindam, vani wrote:
i am concerned about *myself*Is your concern the use of bandwidth?yesIs a disk being filled up and running out of space? Something else?frankly, if the downloaded files cant be used, its *definitely* wastage of spaceAre you *only* concerned about the "apt" command (and maybe apt-get), or is the concern broader?yes i use only aptDo you also want to place restrictions on other commands that can download files and store them on the disk, like lynx, curl, wget, ftp, w3m, firefox-esr, and so on?no
Either alias apt to something harmless or ensure a directory in /home is first in your path and put a script called apt there. e.g. An alias will mean you cannot run apt directly but can bypass it when you really want to. Stick this in your .bashrc or whereever is approprate for your shell. $ alias apt='echo No APT please' $ apt No APT please $ \apt ptapt 1.8.2.3 (amd64) Usage: apt [options] command apt is a commandline package manager and provides commands for searching and managing as well as querying information about packages. It provides the same functionality as the specialized APT tools, like apt-get and apt-cache, but enables options more suitable for interactive use by default. Most used commands: list - list packages based on package names search - search in package descriptions show - show package details install - install packages reinstall - reinstall packages remove - remove packages autoremove - Remove automatically all unused packages update - update list of available packages upgrade - upgrade the system by installing/upgrading packages full-upgrade - upgrade the system by removing/installing/upgrading packages edit-sources - edit the source information file See apt(8) for more information about the available commands. Configuration options and syntax is detailed in apt.conf(5). Information about how to configure sources can be found in sources.list(5). Package and version choices can be expressed via apt_preferences(5). Security details are available in apt-secure(8). This APT has Super Cow Powers. tim@dirac:~ (none)$